From 5d287cfcbb4b91432740ba574c048936675f0182 Mon Sep 17 00:00:00 2001 From: "Aaron J. Seigo" Date: Tue, 29 Apr 2008 01:41:24 +0000 Subject: [PATCH] one more slot pimpl'd svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=802282 --- corona.cpp | 12 +++++++++--- corona.h | 7 +------ 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/corona.cpp b/corona.cpp index abc4d3065..cbc292de6 100644 --- a/corona.cpp +++ b/corona.cpp @@ -176,6 +176,12 @@ public: 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; ImmutabilityType immutability; QString mimetype; @@ -226,15 +232,15 @@ void Corona::saveLayout(const QString &configName) const 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 // 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 // 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. - if (!d->configSyncTimer.isActive()) { - d->configSyncTimer.start(CONFIG_SYNC_TIMEOUT); + if (!configSyncTimer.isActive()) { + configSyncTimer.start(CONFIG_SYNC_TIMEOUT); } } diff --git a/corona.h b/corona.h index 9982dfb00..dbed30294 100644 --- a/corona.h +++ b/corona.h @@ -107,12 +107,6 @@ public Q_SLOTS: */ 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 */ @@ -171,6 +165,7 @@ private: Q_PRIVATE_SLOT(d, void containmentDestroyed(QObject*)) Q_PRIVATE_SLOT(d, void syncConfig()) + Q_PRIVATE_SLOT(d, void scheduleConfigSync()) }; } // namespace Plasma