diff --git a/src/scriptengines/qml/plasmoid/appletinterface.cpp b/src/scriptengines/qml/plasmoid/appletinterface.cpp index c348594c8..e3843b490 100644 --- a/src/scriptengines/qml/plasmoid/appletinterface.cpp +++ b/src/scriptengines/qml/plasmoid/appletinterface.cpp @@ -884,4 +884,9 @@ bool AppletInterface::isLoading() const return m_loading; } +KPluginMetaData AppletInterface::metaData() const +{ + return applet()->pluginMetaData(); +} + #include "moc_appletinterface.cpp" diff --git a/src/scriptengines/qml/plasmoid/appletinterface.h b/src/scriptengines/qml/plasmoid/appletinterface.h index 711c2879a..a6e4f2a9c 100644 --- a/src/scriptengines/qml/plasmoid/appletinterface.h +++ b/src/scriptengines/qml/plasmoid/appletinterface.h @@ -25,6 +25,8 @@ #include #include +#include + #include #include @@ -250,6 +252,12 @@ class AppletInterface : public PlasmaQuick::AppletQuickItem Q_PROPERTY(bool loading MEMBER m_loading NOTIFY isLoadingChanged) + /** + * The metadata of the applet. + * @since 5.73 + */ + Q_PROPERTY(KPluginMetaData metaData READ metaData CONSTANT) + public: AppletInterface(DeclarativeAppletScript *script, const QVariantList &args = QVariantList(), QQuickItem *parent = nullptr); ~AppletInterface() override; @@ -416,6 +424,8 @@ public: QString configurationRequiredReason() const; void setConfigurationRequiredReason(const QString &reason); + KPluginMetaData metaData() const; + Q_SIGNALS: /** * somebody else, usually the containment sent some data to the applet