From d101966f91229037e4c973e32d05cafdec7edfd0 Mon Sep 17 00:00:00 2001 From: Marco Martin Date: Tue, 10 Sep 2013 16:38:16 +0200 Subject: [PATCH] use a dynamic property so qml doesn't see it --- src/scriptengines/qml/plasmoid/wallpaperinterface.cpp | 2 ++ src/scriptengines/qml/plasmoid/wallpaperinterface.h | 1 - 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/scriptengines/qml/plasmoid/wallpaperinterface.cpp b/src/scriptengines/qml/plasmoid/wallpaperinterface.cpp index b8dc871be..31931c66d 100644 --- a/src/scriptengines/qml/plasmoid/wallpaperinterface.cpp +++ b/src/scriptengines/qml/plasmoid/wallpaperinterface.cpp @@ -177,6 +177,7 @@ void WallpaperInterface::setAction(const QString &name, const QString &text, con } action->setObjectName(name); + setProperty("contextualActions", QVariant::fromValue(contextualActions())); } void WallpaperInterface::removeAction(const QString &name) @@ -191,6 +192,7 @@ void WallpaperInterface::removeAction(const QString &name) delete action; } + setProperty("contextualActions", QVariant::fromValue(contextualActions())); } QAction *WallpaperInterface::action(QString name) const diff --git a/src/scriptengines/qml/plasmoid/wallpaperinterface.h b/src/scriptengines/qml/plasmoid/wallpaperinterface.h index 9aaa96de3..45c93fcd3 100644 --- a/src/scriptengines/qml/plasmoid/wallpaperinterface.h +++ b/src/scriptengines/qml/plasmoid/wallpaperinterface.h @@ -41,7 +41,6 @@ class WallpaperInterface : public QQuickItem //Q_PROPERTY(QString plugin READ plugin WRITE setPlugin NOTIFY pluginChanged) Q_PROPERTY(ConfigPropertyMap *configuration READ configuration NOTIFY configurationChanged) - Q_PROPERTY(QList contextualActions READ contextualActions) public: WallpaperInterface(ContainmentInterface *parent = 0);