one more slot pimpl'd

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=802282
This commit is contained in:
Aaron J. Seigo 2008-04-29 01:41:24 +00:00
parent c6f866378d
commit 5d287cfcbb
2 changed files with 10 additions and 9 deletions

View File

@ -176,6 +176,12 @@ public:
return containment; return containment;
} }
/**
* Called when there have been changes made to configuration that should be saved
* to disk at the next convenient moment
*/
void scheduleConfigSync();
Corona *q; Corona *q;
ImmutabilityType immutability; ImmutabilityType immutability;
QString mimetype; QString mimetype;
@ -226,15 +232,15 @@ void Corona::saveLayout(const QString &configName) const
d->saveLayout(c); d->saveLayout(c);
} }
void Corona::scheduleConfigSync() const void Corona::Private::scheduleConfigSync()
{ {
//NOTE: this is a pretty simplistic model: we simply save no more than CONFIG_SYNC_TIMEOUT //NOTE: this is a pretty simplistic model: we simply save no more than CONFIG_SYNC_TIMEOUT
// after the first time this is called. not much of a heuristic for save points, but // after the first time this is called. not much of a heuristic for save points, but
// it should at least compress these activities a bit and provide a way for applet // it should at least compress these activities a bit and provide a way for applet
// authors to ween themselves from the sync() disease. A more interesting/dynamic // authors to ween themselves from the sync() disease. A more interesting/dynamic
// algorithm for determining when to actually sync() to disk might be better, though. // algorithm for determining when to actually sync() to disk might be better, though.
if (!d->configSyncTimer.isActive()) { if (!configSyncTimer.isActive()) {
d->configSyncTimer.start(CONFIG_SYNC_TIMEOUT); configSyncTimer.start(CONFIG_SYNC_TIMEOUT);
} }
} }

View File

@ -107,12 +107,6 @@ public Q_SLOTS:
*/ */
void saveLayout(const QString &config = QString()) const; void saveLayout(const QString &config = QString()) const;
/**
* Called when there have been changes made to configuration that should be saved
* to disk at the next convenient moment
*/
void scheduleConfigSync() const;
/** /**
* Removes a given containment from the corona * Removes a given containment from the corona
*/ */
@ -171,6 +165,7 @@ private:
Q_PRIVATE_SLOT(d, void containmentDestroyed(QObject*)) Q_PRIVATE_SLOT(d, void containmentDestroyed(QObject*))
Q_PRIVATE_SLOT(d, void syncConfig()) Q_PRIVATE_SLOT(d, void syncConfig())
Q_PRIVATE_SLOT(d, void scheduleConfigSync())
}; };
} // namespace Plasma } // namespace Plasma