mirror of
https://bitbucket.org/smil3y/kde-workspace.git
synced 2025-02-24 02:42:50 +00:00
libs: handle KSycoca database update again in Plasma::WidgetExplorer
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
parent
9c0544f790
commit
34c8fa69ee
2 changed files with 18 additions and 2 deletions
|
@ -32,6 +32,7 @@
|
|||
#include <Plasma/Label>
|
||||
#include <klineedit.h>
|
||||
#include <kpixmapwidget.h>
|
||||
#include <ksycoca.h>
|
||||
#include <kicon.h>
|
||||
#include <kdebug.h>
|
||||
|
||||
|
@ -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());
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Add table
Reference in a new issue