diff --git a/kwin/clients/oxygen/config/oxygenconfig.cpp b/kwin/clients/oxygen/config/oxygenconfig.cpp index b269c31f..dd08f05a 100644 --- a/kwin/clients/oxygen/config/oxygenconfig.cpp +++ b/kwin/clients/oxygen/config/oxygenconfig.cpp @@ -47,15 +47,15 @@ //_______________________________________________________________________ extern "C" { - KDE_EXPORT QObject* allocate_config( KConfig* conf, QWidget* parent ) - { return ( new Oxygen::Config( conf, parent ) ); } + KDE_EXPORT QObject* allocate_config( QWidget* parent ) + { return ( new Oxygen::Config( parent ) ); } } namespace Oxygen { //_______________________________________________________________________ - Config::Config( KConfig*, QWidget* parent ): + Config::Config( QWidget* parent ): QObject( parent ) { diff --git a/kwin/clients/oxygen/config/oxygenconfig.h b/kwin/clients/oxygen/config/oxygenconfig.h index 9a830540..f42ad919 100644 --- a/kwin/clients/oxygen/config/oxygenconfig.h +++ b/kwin/clients/oxygen/config/oxygenconfig.h @@ -50,7 +50,7 @@ namespace Oxygen { public: //! constructor - Config( KConfig* conf, QWidget* parent ); + Config( QWidget* parent ); //! destructor ~Config(); @@ -65,16 +65,6 @@ namespace Oxygen { public slots: - //! load configuration - /*! although kconfiggroup argument is not used. It is required by KWin API */ - void load( const KConfigGroup& ) - { load(); } - - //! save configuration - /*! although kconfiggroup argument is not used. It is required by KWin API */ - void save( KConfigGroup& ) - { save(); } - //! load configuration void load( void ); diff --git a/kwin/clients/oxygen/oxygenfactory.cpp b/kwin/clients/oxygen/oxygenfactory.cpp index 46c63af4..7376c19c 100644 --- a/kwin/clients/oxygen/oxygenfactory.cpp +++ b/kwin/clients/oxygen/oxygenfactory.cpp @@ -30,7 +30,6 @@ #include "oxygenexceptionlist.h" #include -#include #include #include #include diff --git a/kwin/kcmkwin/kwindecoration/kwindecoration.cpp b/kwin/kcmkwin/kwindecoration/kwindecoration.cpp index 0e6138d0..46fd6387 100644 --- a/kwin/kcmkwin/kwindecoration/kwindecoration.cpp +++ b/kwin/kcmkwin/kwindecoration/kwindecoration.cpp @@ -38,6 +38,7 @@ #include #include #include +#include static QString styleToConfigLib(KConfigGroup &conf) { @@ -97,13 +98,12 @@ void KWinDecorationModule::load() if (library.load()) { void *alloc_ptr = library.resolve("allocate_config"); if (alloc_ptr != nullptr) { - allocatePlugin = (QObject * (*)(KConfigGroup & conf, QWidget * parent))alloc_ptr; + allocatePlugin = (QObject * (*)(QWidget * parent))alloc_ptr; m_pluginConfigWidget = new KVBox(this); - m_pluginObject = (QObject*)(allocatePlugin(config, m_pluginConfigWidget)); + m_pluginObject = (QObject*)(allocatePlugin(m_pluginConfigWidget)); // connect required signals and slots together... connect(m_pluginObject, SIGNAL(changed()), this, SLOT(slotSelectionChanged())); - connect(this, SIGNAL(pluginSave(KConfigGroup&)), m_pluginObject, SLOT(save(KConfigGroup&))); } } @@ -114,9 +114,10 @@ void KWinDecorationModule::load() void KWinDecorationModule::save() { - KConfigGroup config(m_kwinConfig, "Style"); - emit pluginSave(config); - config.sync(); + const bool saved = QMetaObject::invokeMethod(m_pluginObject, "save"); + if (!saved) { + kWarning() << "Could not save decoration settings"; + } // We saved, so tell kcmodule that there have been no new user changes made. emit KCModule::changed(false); diff --git a/kwin/kcmkwin/kwindecoration/kwindecoration.h b/kwin/kcmkwin/kwindecoration/kwindecoration.h index 05c60235..74459081 100644 --- a/kwin/kcmkwin/kwindecoration/kwindecoration.h +++ b/kwin/kcmkwin/kwindecoration/kwindecoration.h @@ -52,16 +52,13 @@ public: virtual void save(); virtual void defaults(); -Q_SIGNALS: - void pluginSave(KConfigGroup &conf); - private slots: void slotSelectionChanged(); private: KSharedConfigPtr m_kwinConfig; QVBoxLayout* m_layout; - QObject* (*allocatePlugin)(KConfigGroup& conf, QWidget* parent); + QObject* (*allocatePlugin)(QWidget* parent); QObject* m_pluginObject; QWidget* m_pluginConfigWidget; };