since applet() comes from the subclasses, let the subclasses trigger the reload
svn path=/trunk/KDE/kdebase/workspace/; revision=1159651
This commit is contained in:
parent
c99ce29222
commit
6b982a82e0
11
applet.cpp
11
applet.cpp
@ -59,10 +59,6 @@ Applet::Applet(QObject *parent)
|
||||
|
||||
Applet::~Applet()
|
||||
{
|
||||
if (d->configDirty) {
|
||||
reloadConfig();
|
||||
}
|
||||
|
||||
delete d;
|
||||
}
|
||||
|
||||
@ -186,6 +182,13 @@ void Applet::writeGlobalConfig(const QString &key, const QVariant &value)
|
||||
}
|
||||
}
|
||||
|
||||
void Applet::reloadConfigIfNeeded()
|
||||
{
|
||||
if (d->configDirty) {
|
||||
reloadConfigIfNeeded();
|
||||
}
|
||||
}
|
||||
|
||||
void Applet::reloadConfig()
|
||||
{
|
||||
Plasma::Applet *app = applet();
|
||||
|
3
applet.h
3
applet.h
@ -64,6 +64,9 @@ public:
|
||||
|
||||
virtual Plasma::Applet *applet() const;
|
||||
|
||||
protected:
|
||||
void reloadConfigIfNeeded();
|
||||
|
||||
public Q_SLOTS:
|
||||
virtual QVariant readConfig(const QString &key, const QVariant &def = QString()) const;
|
||||
virtual void writeConfig(const QString &key, const QVariant &value);
|
||||
|
@ -68,6 +68,7 @@ Containment::~Containment()
|
||||
}
|
||||
}
|
||||
|
||||
reloadConfigIfNeeded();
|
||||
delete d;
|
||||
}
|
||||
|
||||
|
@ -50,6 +50,7 @@ Widget::Widget(Plasma::Applet *applet, QObject *parent)
|
||||
|
||||
Widget::~Widget()
|
||||
{
|
||||
reloadConfigIfNeeded();
|
||||
delete d;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user