mirror of
https://bitbucket.org/smil3y/kde-workspace.git
synced 2025-02-23 18:32:50 +00:00
kwin: remove unused Oxygen::Config methods arguments
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
parent
d70570e598
commit
e33272eab0
5 changed files with 12 additions and 25 deletions
|
@ -47,15 +47,15 @@
|
||||||
//_______________________________________________________________________
|
//_______________________________________________________________________
|
||||||
extern "C"
|
extern "C"
|
||||||
{
|
{
|
||||||
KDE_EXPORT QObject* allocate_config( KConfig* conf, QWidget* parent )
|
KDE_EXPORT QObject* allocate_config( QWidget* parent )
|
||||||
{ return ( new Oxygen::Config( conf, parent ) ); }
|
{ return ( new Oxygen::Config( parent ) ); }
|
||||||
}
|
}
|
||||||
|
|
||||||
namespace Oxygen
|
namespace Oxygen
|
||||||
{
|
{
|
||||||
|
|
||||||
//_______________________________________________________________________
|
//_______________________________________________________________________
|
||||||
Config::Config( KConfig*, QWidget* parent ):
|
Config::Config( QWidget* parent ):
|
||||||
QObject( parent )
|
QObject( parent )
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
|
@ -50,7 +50,7 @@ namespace Oxygen {
|
||||||
public:
|
public:
|
||||||
|
|
||||||
//! constructor
|
//! constructor
|
||||||
Config( KConfig* conf, QWidget* parent );
|
Config( QWidget* parent );
|
||||||
|
|
||||||
//! destructor
|
//! destructor
|
||||||
~Config();
|
~Config();
|
||||||
|
@ -65,16 +65,6 @@ namespace Oxygen {
|
||||||
|
|
||||||
public slots:
|
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
|
//! load configuration
|
||||||
void load( void );
|
void load( void );
|
||||||
|
|
||||||
|
|
|
@ -30,7 +30,6 @@
|
||||||
#include "oxygenexceptionlist.h"
|
#include "oxygenexceptionlist.h"
|
||||||
|
|
||||||
#include <KSharedConfig>
|
#include <KSharedConfig>
|
||||||
#include <KConfigGroup>
|
|
||||||
#include <KDebug>
|
#include <KDebug>
|
||||||
#include <KGlobal>
|
#include <KGlobal>
|
||||||
#include <KWindowInfo>
|
#include <KWindowInfo>
|
||||||
|
|
|
@ -38,6 +38,7 @@
|
||||||
#include <KConfigGroup>
|
#include <KConfigGroup>
|
||||||
#include <KVBox>
|
#include <KVBox>
|
||||||
#include <KLocale>
|
#include <KLocale>
|
||||||
|
#include <KDebug>
|
||||||
|
|
||||||
static QString styleToConfigLib(KConfigGroup &conf)
|
static QString styleToConfigLib(KConfigGroup &conf)
|
||||||
{
|
{
|
||||||
|
@ -97,13 +98,12 @@ void KWinDecorationModule::load()
|
||||||
if (library.load()) {
|
if (library.load()) {
|
||||||
void *alloc_ptr = library.resolve("allocate_config");
|
void *alloc_ptr = library.resolve("allocate_config");
|
||||||
if (alloc_ptr != nullptr) {
|
if (alloc_ptr != nullptr) {
|
||||||
allocatePlugin = (QObject * (*)(KConfigGroup & conf, QWidget * parent))alloc_ptr;
|
allocatePlugin = (QObject * (*)(QWidget * parent))alloc_ptr;
|
||||||
m_pluginConfigWidget = new KVBox(this);
|
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 required signals and slots together...
|
||||||
connect(m_pluginObject, SIGNAL(changed()), this, SLOT(slotSelectionChanged()));
|
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()
|
void KWinDecorationModule::save()
|
||||||
{
|
{
|
||||||
KConfigGroup config(m_kwinConfig, "Style");
|
const bool saved = QMetaObject::invokeMethod(m_pluginObject, "save");
|
||||||
emit pluginSave(config);
|
if (!saved) {
|
||||||
config.sync();
|
kWarning() << "Could not save decoration settings";
|
||||||
|
}
|
||||||
|
|
||||||
// We saved, so tell kcmodule that there have been no new user changes made.
|
// We saved, so tell kcmodule that there have been no new user changes made.
|
||||||
emit KCModule::changed(false);
|
emit KCModule::changed(false);
|
||||||
|
|
|
@ -52,16 +52,13 @@ public:
|
||||||
virtual void save();
|
virtual void save();
|
||||||
virtual void defaults();
|
virtual void defaults();
|
||||||
|
|
||||||
Q_SIGNALS:
|
|
||||||
void pluginSave(KConfigGroup &conf);
|
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
void slotSelectionChanged();
|
void slotSelectionChanged();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
KSharedConfigPtr m_kwinConfig;
|
KSharedConfigPtr m_kwinConfig;
|
||||||
QVBoxLayout* m_layout;
|
QVBoxLayout* m_layout;
|
||||||
QObject* (*allocatePlugin)(KConfigGroup& conf, QWidget* parent);
|
QObject* (*allocatePlugin)(QWidget* parent);
|
||||||
QObject* m_pluginObject;
|
QObject* m_pluginObject;
|
||||||
QWidget* m_pluginConfigWidget;
|
QWidget* m_pluginConfigWidget;
|
||||||
};
|
};
|
||||||
|
|
Loading…
Add table
Reference in a new issue