diff --git a/libs/plasmagenericshell/widgetsexplorer/widgetexplorer.cpp b/libs/plasmagenericshell/widgetsexplorer/widgetexplorer.cpp index 336ff194..36f147a3 100644 --- a/libs/plasmagenericshell/widgetsexplorer/widgetexplorer.cpp +++ b/libs/plasmagenericshell/widgetsexplorer/widgetexplorer.cpp @@ -32,6 +32,7 @@ #include #include #include +#include #include #include @@ -207,6 +208,7 @@ public: void _k_immutabilityChanged(const Plasma::ImmutabilityType type); void _k_textChanged(const QString &text); void _k_closePressed(); + void _k_databaseChanged(const QStringList &resources); Plasma::Location location; WidgetExplorer* q; @@ -287,6 +289,11 @@ void WidgetExplorerPrivate::init(Plasma::Location loc) updateOrientation(orientation); q->setLayout(mainLayout); + + q->connect( + KSycoca::self(), SIGNAL(databaseChanged(QStringList)), + q, SLOT(_k_databaseChanged(QStringList)) + ); } void WidgetExplorerPrivate::updateApplets() @@ -375,6 +382,14 @@ void WidgetExplorerPrivate::_k_closePressed() emit q->closeClicked(); } +void WidgetExplorerPrivate::_k_databaseChanged(const QStringList &resources) +{ + if (resources.contains("services")) { + updateApplets(); + filterApplets(filterEdit->text()); + } +} + void WidgetExplorerPrivate::_k_appletAdded(Plasma::Applet *applet) { runningApplets.insert(applet, applet->pluginName()); diff --git a/libs/plasmagenericshell/widgetsexplorer/widgetexplorer.h b/libs/plasmagenericshell/widgetsexplorer/widgetexplorer.h index fd2b1159..1aeb3622 100644 --- a/libs/plasmagenericshell/widgetsexplorer/widgetexplorer.h +++ b/libs/plasmagenericshell/widgetsexplorer/widgetexplorer.h @@ -63,12 +63,13 @@ protected: void keyPressEvent(QKeyEvent *event); private: - Q_PRIVATE_SLOT(d, void _k_appletAdded(Plasma::Applet *applet)) - Q_PRIVATE_SLOT(d, void _k_appletRemoved(Plasma::Applet *applet)) + Q_PRIVATE_SLOT(d, void _k_appletAdded(Plasma::Applet*)) + Q_PRIVATE_SLOT(d, void _k_appletRemoved(Plasma::Applet*)) Q_PRIVATE_SLOT(d, void _k_containmentDestroyed()) Q_PRIVATE_SLOT(d, void _k_immutabilityChanged(Plasma::ImmutabilityType)) Q_PRIVATE_SLOT(d, void _k_textChanged(QString)) Q_PRIVATE_SLOT(d, void _k_closePressed()) + Q_PRIVATE_SLOT(d, void _k_databaseChanged(QStringList)) WidgetExplorerPrivate * const d; friend WidgetExplorerPrivate;