diff --git a/applet.cpp b/applet.cpp index 99e34ddd9..87ae8a85d 100644 --- a/applet.cpp +++ b/applet.cpp @@ -103,7 +103,7 @@ Applet::Applet(QObject* parentObject, const QVariantList& args) Applet::~Applet() { if (d->transient) { - resetConfigurationObject(); + d->resetConfigurationObject(); } delete d; @@ -264,13 +264,6 @@ void Applet::destroy() deleteLater(); } -void Applet::resetConfigurationObject() -{ - d->mainConfigGroup()->deleteGroup(); - delete d->mainConfig; - d->mainConfig = 0; -} - ConfigXml* Applet::configScheme() const { return d->configXml; @@ -1409,6 +1402,13 @@ void Applet::Private::themeChanged() q->update(); } +void Applet::Private::resetConfigurationObject() +{ + mainConfigGroup()->deleteGroup(); + delete mainConfig; + mainConfig = 0; +} + uint Applet::Private::s_maxAppletId = 0; uint Applet::Private::s_maxZValue = 0; uint Applet::Private::s_minZValue = 0; diff --git a/applet.h b/applet.h index 3cb1c37a3..eac1d5c04 100644 --- a/applet.h +++ b/applet.h @@ -424,11 +424,6 @@ class PLASMA_EXPORT Applet : public QGraphicsWidget int type() const; enum { Type = Plasma::AppletType }; - /** - * @internal - */ - void resetConfigurationObject(); - /** * @return the Containment, if any, this applet belongs to **/ diff --git a/applet_p.h b/applet_p.h index 6b0c58471..c24ca5cee 100644 --- a/applet_p.h +++ b/applet_p.h @@ -59,6 +59,7 @@ public: QString visibleFailureText(const QString& reason); void checkImmutability(); void themeChanged(); + void resetConfigurationObject(); static uint s_maxAppletId; static uint s_maxZValue; diff --git a/containment.cpp b/containment.cpp index 1526cd280..8ed7ff6b0 100644 --- a/containment.cpp +++ b/containment.cpp @@ -42,6 +42,7 @@ #include #include +#include "applet_p.h" #include "applethandle_p.h" #include "corona.h" #include "animator.h" @@ -445,7 +446,7 @@ void Containment::addApplet(Applet *applet, const QPointF &pos, bool delayInit) // now move the old config to the new location KConfigGroup c = config().group("Applets").group(QString::number(applet->id())); oldConfig.reparent(&c); - applet->resetConfigurationObject(); + applet->d->resetConfigurationObject(); } else { applet->setParentItem(this); }