resetConfigurationObject()->pimpl

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=802892
This commit is contained in:
Aaron J. Seigo 2008-05-01 03:24:20 +00:00
parent 43e6bac986
commit 207968b217
4 changed files with 11 additions and 14 deletions

View File

@ -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;

View File

@ -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
**/

View File

@ -59,6 +59,7 @@ public:
QString visibleFailureText(const QString& reason);
void checkImmutability();
void themeChanged();
void resetConfigurationObject();
static uint s_maxAppletId;
static uint s_maxZValue;

View File

@ -42,6 +42,7 @@
#include <KStandardDirs>
#include <KWindowSystem>
#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);
}