diff --git a/src/shell/qmlpackages/desktop/contents/explorer/WidgetExplorer.qml b/src/shell/qmlpackages/desktop/contents/explorer/WidgetExplorer.qml index 20886a007..7574e93da 100644 --- a/src/shell/qmlpackages/desktop/contents/explorer/WidgetExplorer.qml +++ b/src/shell/qmlpackages/desktop/contents/explorer/WidgetExplorer.qml @@ -44,6 +44,7 @@ Item { WidgetExplorer { id: widgetExplorer desktopView: desktop + onShouldClose: main.closed(); } PlasmaComponents.ContextMenu { diff --git a/src/shell/widgetexplorer/widgetexplorer.cpp b/src/shell/widgetexplorer/widgetexplorer.cpp index 3563ab15f..86716edb6 100644 --- a/src/shell/widgetexplorer/widgetexplorer.cpp +++ b/src/shell/widgetexplorer/widgetexplorer.cpp @@ -391,7 +391,7 @@ void WidgetExplorer::addApplet(const QString &pluginName) void WidgetExplorer::immutabilityChanged(Plasma::Types::ImmutabilityType type) { if (type != Plasma::Types::Mutable) { - close(); + emit shouldClose(); } } @@ -442,7 +442,7 @@ void WidgetExplorer::downloadWidgets(const QString &type) knsDialog->raise(); */ } - close(); + emit shouldClose(); } void WidgetExplorer::openWidgetFile() @@ -460,7 +460,7 @@ void WidgetExplorer::openWidgetFile() assistant->raise(); assistant->setFocus(); */ - close(); + emit shouldClose(); } void WidgetExplorer::uninstall(const QString &pluginName) @@ -481,11 +481,5 @@ void WidgetExplorer::uninstall(const QString &pluginName) } } -void WidgetExplorer::close() -{ - emit closed(); - deleteLater(); -} - #include "moc_widgetexplorer.cpp" diff --git a/src/shell/widgetexplorer/widgetexplorer.h b/src/shell/widgetexplorer/widgetexplorer.h index 5614d6e96..453aae182 100644 --- a/src/shell/widgetexplorer/widgetexplorer.h +++ b/src/shell/widgetexplorer/widgetexplorer.h @@ -128,13 +128,10 @@ public: */ Q_INVOKABLE void uninstall(const QString &pluginName); - Q_INVOKABLE void close(); - //Q_INVOKABLE QPoint tooltipPosition(QGraphicsObject *item, int tipWidth, int tipHeight); - Q_SIGNALS: void widgetsMenuActionsChanged(); void extraActionsChanged(); - void closed(); + void shouldClose(); void desktopViewChanged(); void applicationChanged();