diff --git a/view.cpp b/view.cpp index 2e4c78bef..20cce3178 100644 --- a/view.cpp +++ b/view.cpp @@ -97,8 +97,9 @@ public: void containmentScreenChanged(int wasScreen, int newScreen, Plasma::Containment *containment) { + Q_UNUSED(wasScreen) lastScreen = newScreen; - lastDesktop = this->containment->desktop(); + lastDesktop = containment->desktop(); } void initGraphicsView() @@ -332,6 +333,16 @@ KConfigGroup View::config() const return KConfigGroup(&views, QString::number(d->viewId)); } +void View::configNeedsSaving() const +{ + Plasma::Corona *corona = qobject_cast(scene()); + if (corona) { + corona->requestConfigSync(); + } else { + KGlobal::config()->sync(); + } +} + int View::id() const { return d->viewId; diff --git a/view.h b/view.h index 2e1358867..c2d0f7397 100644 --- a/view.h +++ b/view.h @@ -192,6 +192,12 @@ protected: */ KConfigGroup config() const; + + /** + * Requests that the config be synchronized to disk + */ + void configNeedsSaving() const; + private: ViewPrivate * const d;