diff --git a/kcmkwin/kwincompositing/main.cpp b/kcmkwin/kwincompositing/main.cpp index 0df802446a..58ed0f313e 100644 --- a/kcmkwin/kwincompositing/main.cpp +++ b/kcmkwin/kwincompositing/main.cpp @@ -36,6 +36,9 @@ public: explicit KWinCompositingKCM(QWidget* parent = 0, const QVariantList& args = QVariantList()); virtual ~KWinCompositingKCM(); +public Q_SLOTS: + void save() override; + private: QScopedPointer m_view; }; @@ -64,6 +67,12 @@ KWinCompositingKCM::~KWinCompositingKCM() { } +void KWinCompositingKCM::save() +{ + m_view->save(); + KCModule::save(); +} + K_PLUGIN_FACTORY(KWinCompositingConfigFactory, registerPlugin(); ) diff --git a/kcmkwin/kwincompositing/model.cpp b/kcmkwin/kwincompositing/model.cpp index 2aa757f201..df0ac1be64 100644 --- a/kcmkwin/kwincompositing/model.cpp +++ b/kcmkwin/kwincompositing/model.cpp @@ -375,5 +375,15 @@ void EffectView::init() connect(rootObject(), SIGNAL(changed()), this, SIGNAL(changed())); } +void EffectView::save() +{ + if (auto *model = rootObject()->findChild(QStringLiteral("filterModel"))) { + model->syncConfig(); + } + if (auto *compositing = rootObject()->findChild(QStringLiteral("compositing"))) { + compositing->save(); + } +} + }//end namespace Compositing }//end namespace KWin diff --git a/kcmkwin/kwincompositing/model.h b/kcmkwin/kwincompositing/model.h index 7b664ad74f..8d207ac110 100644 --- a/kcmkwin/kwincompositing/model.h +++ b/kcmkwin/kwincompositing/model.h @@ -102,6 +102,8 @@ public: Q_INVOKABLE QColor backgroundViewColor() { return KColorScheme(QPalette::Active, KColorScheme::Window, KSharedConfigPtr(0)).background(KColorScheme::NormalBackground).color(); }; + void save(); + Q_SIGNALS: void changed(); private: