diff --git a/shell/standaloneappcorona.cpp b/shell/standaloneappcorona.cpp index 50af896de..dd9b69b09 100644 --- a/shell/standaloneappcorona.cpp +++ b/shell/standaloneappcorona.cpp @@ -43,6 +43,7 @@ StandaloneAppCorona::StandaloneAppCorona(const QString &coronaPlugin, QObject *p Plasma::Package package = Plasma::PluginLoader::self()->loadPackage("Plasma/Shell"); package.setPath(m_coronaPlugin); + package.setAllowExternalPaths(true); setPackage(package); Plasma::Theme theme; @@ -172,6 +173,9 @@ void StandaloneAppCorona::currentActivityChanged(const QString &newActivity) Plasma::Containment *c = createContainmentForActivity(newActivity, 0); + connect(c, &Plasma::Containment::showAddWidgetsInterface, + this, &StandaloneAppCorona::toggleWidgetExplorer); + QAction *removeAction = c->actions()->action("remove"); if (removeAction) { removeAction->deleteLater(); @@ -180,6 +184,13 @@ void StandaloneAppCorona::currentActivityChanged(const QString &newActivity) } +void StandaloneAppCorona::toggleWidgetExplorer() +{ + //The view QML has to provide something to display the widget explorer + m_view->rootObject()->metaObject()->invokeMethod(m_view->rootObject(), "toggleWidgetExplorer", Q_ARG(QVariant, QVariant::fromValue(sender()))); + return; +} + void StandaloneAppCorona::insertActivity(const QString &id, Activity *activity) { m_activities.insert(id, activity); diff --git a/shell/standaloneappcorona.h b/shell/standaloneappcorona.h index d9584d4af..716266319 100644 --- a/shell/standaloneappcorona.h +++ b/shell/standaloneappcorona.h @@ -52,6 +52,7 @@ public Q_SLOTS: void currentActivityChanged(const QString &newActivity); void activityAdded(const QString &id); void activityRemoved(const QString &id); + void toggleWidgetExplorer(); protected Q_SLOTS: int screenForContainment(const Plasma::Containment *containment) const;