- pass the right instance to KCModule
- don't leak a KConfig object - don't use a KCModule widget for each tab svn path=/trunk/kdebase/kwin/; revision=133741
This commit is contained in:
parent
f92f6d8b4f
commit
d8d4f8bfa1
7 changed files with 29 additions and 12 deletions
|
@ -46,7 +46,7 @@ typedef KGenericFactory<KWinDecorationModule, QWidget> KWinDecoFactory;
|
|||
K_EXPORT_COMPONENT_FACTORY( libkcm_kwindecoration, KWinDecoFactory("kcmkwindecoration") );
|
||||
|
||||
KWinDecorationModule::KWinDecorationModule(QWidget* parent, const char* name, const QStringList &)
|
||||
: KCModule(parent, name), DCOPObject("KWinClientDecoration")
|
||||
: KCModule(KWinDecoFactory::instance(), parent, name), DCOPObject("KWinClientDecoration")
|
||||
{
|
||||
KConfig kwinConfig("kwinrc");
|
||||
kwinConfig.setGroup("Style");
|
||||
|
|
|
@ -46,7 +46,7 @@ extern "C" {
|
|||
}
|
||||
*/
|
||||
KWinOptions::KWinOptions(QWidget *parent, const char *name, const QStringList &)
|
||||
: KCModule(parent, name)
|
||||
: KCModule(KWinOptFactory::instance(), parent, name)
|
||||
{
|
||||
mConfig = new KConfig("kwinrc", false, true);
|
||||
|
||||
|
@ -71,6 +71,10 @@ KWinOptions::KWinOptions(QWidget *parent, const char *name, const QStringList &)
|
|||
connect(mAdvanced, SIGNAL(changed(bool)), this, SLOT(moduleChanged(bool)));
|
||||
}
|
||||
|
||||
KWinOptions::~KWinOptions()
|
||||
{
|
||||
delete mConfig;
|
||||
}
|
||||
|
||||
void KWinOptions::load()
|
||||
{
|
||||
|
|
|
@ -41,6 +41,7 @@ class KWinOptions : public KCModule
|
|||
public:
|
||||
|
||||
KWinOptions(QWidget *parent, const char *name, const QStringList &);
|
||||
virtual ~KWinOptions();
|
||||
|
||||
void load();
|
||||
void save();
|
||||
|
|
|
@ -47,7 +47,7 @@ KActionsConfig::~KActionsConfig ()
|
|||
}
|
||||
|
||||
KActionsConfig::KActionsConfig (KConfig *_config, QWidget * parent, const char *name)
|
||||
: KCModule (parent, name), config(_config)
|
||||
: QWidget (parent, name), config(_config)
|
||||
{
|
||||
QString strWin1, strWin2, strWin3, strAllKey, strAll1, strAll2, strAll3;
|
||||
QVBoxLayout *layout = new QVBoxLayout(this, KDialog::marginHint(), KDialog::spacingHint());
|
||||
|
|
|
@ -25,9 +25,9 @@
|
|||
class QComboBox;
|
||||
class KConfig;
|
||||
|
||||
#include <kcmodule.h>
|
||||
#include <qwidget.h>
|
||||
|
||||
class KActionsConfig : public KCModule
|
||||
class KActionsConfig : public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
|
@ -40,6 +40,9 @@ public:
|
|||
void save();
|
||||
void defaults();
|
||||
|
||||
signals:
|
||||
void changed( bool state );
|
||||
|
||||
private slots:
|
||||
void slotChanged();
|
||||
|
||||
|
|
|
@ -89,7 +89,7 @@ KFocusConfig::~KFocusConfig ()
|
|||
|
||||
// removed the LCD display over the slider - this is not good GUI design :) RNolden 051701
|
||||
KFocusConfig::KFocusConfig (KConfig *_config, QWidget * parent, const char *name)
|
||||
: KCModule (parent, name), config(_config)
|
||||
: QWidget (parent, name), config(_config)
|
||||
{
|
||||
QString wtstr;
|
||||
QBoxLayout *lay = new QVBoxLayout (this, KDialog::marginHint(),
|
||||
|
@ -401,7 +401,7 @@ KAdvancedConfig::~KAdvancedConfig ()
|
|||
}
|
||||
|
||||
KAdvancedConfig::KAdvancedConfig (KConfig *_config, QWidget *parent, const char *name)
|
||||
: KCModule (parent, name), config(_config)
|
||||
: QWidget (parent, name), config(_config)
|
||||
{
|
||||
QString wtstr;
|
||||
QBoxLayout *lay = new QVBoxLayout (this, KDialog::marginHint(),
|
||||
|
@ -653,7 +653,7 @@ KMovingConfig::~KMovingConfig ()
|
|||
}
|
||||
|
||||
KMovingConfig::KMovingConfig (KConfig *_config, QWidget *parent, const char *name)
|
||||
: KCModule (parent, name), config(_config)
|
||||
: QWidget (parent, name), config(_config)
|
||||
{
|
||||
QString wtstr;
|
||||
QBoxLayout *lay = new QVBoxLayout (this, KDialog::marginHint(),
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
#ifndef __KWINDOWCONFIG_H__
|
||||
#define __KWINDOWCONFIG_H__
|
||||
|
||||
#include <kcmodule.h>
|
||||
#include <qwidget.h>
|
||||
#include <config.h>
|
||||
|
||||
class QRadioButton;
|
||||
|
@ -62,7 +62,7 @@ class KIntNumInput;
|
|||
|
||||
class QSpinBox;
|
||||
|
||||
class KFocusConfig : public KCModule
|
||||
class KFocusConfig : public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
|
@ -73,6 +73,9 @@ public:
|
|||
void save();
|
||||
void defaults();
|
||||
|
||||
signals:
|
||||
void changed( bool state );
|
||||
|
||||
private slots:
|
||||
void setAutoRaiseEnabled();
|
||||
void autoRaiseOnTog(bool);//CT 23Oct1998
|
||||
|
@ -107,7 +110,7 @@ private:
|
|||
KConfig *config;
|
||||
};
|
||||
|
||||
class KMovingConfig : public KCModule
|
||||
class KMovingConfig : public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
|
@ -118,6 +121,9 @@ public:
|
|||
void save();
|
||||
void defaults();
|
||||
|
||||
signals:
|
||||
void changed( bool state );
|
||||
|
||||
private slots:
|
||||
void slotChanged();
|
||||
|
||||
|
@ -159,7 +165,7 @@ private:
|
|||
|
||||
};
|
||||
|
||||
class KAdvancedConfig : public KCModule
|
||||
class KAdvancedConfig : public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
|
@ -170,6 +176,9 @@ public:
|
|||
void save();
|
||||
void defaults();
|
||||
|
||||
signals:
|
||||
void changed( bool state );
|
||||
|
||||
private slots:
|
||||
void slotChanged();
|
||||
void shadeHoverChanged(bool);
|
||||
|
|
Loading…
Reference in a new issue