From aaf7fa328d9966eb019ebb34b5596aa79dedb39e Mon Sep 17 00:00:00 2001 From: Marco Martin Date: Thu, 20 Feb 2014 12:33:31 +0100 Subject: [PATCH] export plugin name not super nice but the simplest way to avoid code duplication in the image plugin --- src/scriptengines/qml/plasmoid/wallpaperinterface.cpp | 5 +++++ src/scriptengines/qml/plasmoid/wallpaperinterface.h | 4 +++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/src/scriptengines/qml/plasmoid/wallpaperinterface.cpp b/src/scriptengines/qml/plasmoid/wallpaperinterface.cpp index 519e8b98a..90a6ce756 100644 --- a/src/scriptengines/qml/plasmoid/wallpaperinterface.cpp +++ b/src/scriptengines/qml/plasmoid/wallpaperinterface.cpp @@ -78,6 +78,11 @@ Plasma::Package WallpaperInterface::package() const return m_pkg; } +QString WallpaperInterface::pluginName() const +{ + return m_wallpaperPlugin; +} + KDeclarative::ConfigPropertyMap *WallpaperInterface::configuration() const { return m_configuration; diff --git a/src/scriptengines/qml/plasmoid/wallpaperinterface.h b/src/scriptengines/qml/plasmoid/wallpaperinterface.h index 8a4621f9e..58ec477de 100644 --- a/src/scriptengines/qml/plasmoid/wallpaperinterface.h +++ b/src/scriptengines/qml/plasmoid/wallpaperinterface.h @@ -44,7 +44,7 @@ class WallpaperInterface : public QQuickItem { Q_OBJECT - //Q_PROPERTY(QString plugin READ plugin WRITE setPlugin NOTIFY pluginChanged) + Q_PROPERTY(QString pluginName READ pluginName NOTIFY packageChanged) Q_PROPERTY(KDeclarative::ConfigPropertyMap *configuration READ configuration NOTIFY configurationChanged) public: @@ -62,6 +62,8 @@ public: Plasma::Package package() const; + QString pluginName() const; + KDeclarative::ConfigPropertyMap *configuration() const; Plasma::ConfigLoader *configScheme();