diff --git a/scriptengines/javascript/plasmoid/appletinterface.cpp b/scriptengines/javascript/plasmoid/appletinterface.cpp index 668faae00..2564cb8b0 100644 --- a/scriptengines/javascript/plasmoid/appletinterface.cpp +++ b/scriptengines/javascript/plasmoid/appletinterface.cpp @@ -294,6 +294,11 @@ void AppletInterface::removeAction(const QString &name) m_actions.remove(name); } +QAction *AppletInterface::action(QString name) const +{ + return applet()->action(name); +} + void AppletInterface::resize(qreal w, qreal h) { applet()->resize(w,h); diff --git a/scriptengines/javascript/plasmoid/appletinterface.h b/scriptengines/javascript/plasmoid/appletinterface.h index da5b8b261..51caf424c 100644 --- a/scriptengines/javascript/plasmoid/appletinterface.h +++ b/scriptengines/javascript/plasmoid/appletinterface.h @@ -249,6 +249,8 @@ enum IntervalAlignment { Q_INVOKABLE void removeAction(const QString &name); + Q_INVOKABLE QAction *action(QString name) const; + Q_INVOKABLE void resize(qreal w, qreal h); Q_INVOKABLE void setMinimumSize(qreal w, qreal h);