Fix signal/slot
(but we don't use argument, perhaps we can cleanup it) svn path=/trunk/KDE/kdebase/workspace/; revision=663562
This commit is contained in:
parent
66b63ee26d
commit
1c8fa826ed
13 changed files with 42 additions and 36 deletions
|
@ -71,7 +71,8 @@ B2Config::B2Config( KConfig* conf, QWidget* parent )
|
|||
"of the menu button. Leave it to none if in doubt."));
|
||||
|
||||
// Load configuration options
|
||||
load(conf);
|
||||
KConfigGroup cg(b2Config, "General");
|
||||
load(cg);
|
||||
|
||||
// Ensure we track user changes properly
|
||||
connect(cbColorBorder, SIGNAL(clicked()),
|
||||
|
@ -100,7 +101,7 @@ void B2Config::slotSelectionChanged()
|
|||
|
||||
// Loads the configurable options from the kwinrc config file
|
||||
// It is passed the open config from kwindecoration to improve efficiency
|
||||
void B2Config::load(KConfig * /*conf*/)
|
||||
void B2Config::load(const KConfigGroup & /*conf*/)
|
||||
{
|
||||
KConfigGroup cg(b2Config, "General");
|
||||
|
||||
|
@ -145,7 +146,7 @@ static QString opToString(int op)
|
|||
|
||||
|
||||
// Saves the configurable options to the kwinrc config file
|
||||
void B2Config::save(KConfig * /*conf*/)
|
||||
void B2Config::save(KConfigGroup & /*conf*/)
|
||||
{
|
||||
KConfigGroup cg(b2Config, "General");
|
||||
cg.writeEntry("UseTitleBarBorderColors", cbColorBorder->isChecked());
|
||||
|
|
|
@ -28,8 +28,8 @@ class B2Config: public QObject
|
|||
void changed();
|
||||
|
||||
public slots:
|
||||
void load( KConfig* conf );
|
||||
void save( KConfig* conf );
|
||||
void load( const KConfigGroup& conf );
|
||||
void save( KConfigGroup& conf );
|
||||
void defaults();
|
||||
|
||||
protected slots:
|
||||
|
|
|
@ -30,7 +30,7 @@ extern "C"
|
|||
// Configure tab in kwindecoration
|
||||
|
||||
KDEDefaultConfig::KDEDefaultConfig( KConfig* conf, QWidget* parent )
|
||||
: QObject( parent )
|
||||
: QObject( parent ),c(conf)
|
||||
{
|
||||
KGlobal::locale()->insertCatalog("kwin_clients");
|
||||
highcolor = QPixmap::defaultDepth() > 8;
|
||||
|
@ -58,7 +58,8 @@ KDEDefaultConfig::KDEDefaultConfig( KConfig* conf, QWidget* parent )
|
|||
}
|
||||
|
||||
// Load configuration options
|
||||
load( conf );
|
||||
KConfigGroup cg(c, "KDEDefault");
|
||||
load( cg );
|
||||
|
||||
// Ensure we track user changes properly
|
||||
connect( cbShowStipple, SIGNAL(clicked()),
|
||||
|
@ -88,9 +89,9 @@ void KDEDefaultConfig::slotSelectionChanged()
|
|||
|
||||
// Loads the configurable options from the kwinrc config file
|
||||
// It is passed the open config from kwindecoration to improve efficiency
|
||||
void KDEDefaultConfig::load( KConfig* conf )
|
||||
void KDEDefaultConfig::load( const KConfigGroup& )
|
||||
{
|
||||
KConfigGroup cg(conf, "KDEDefault");
|
||||
KConfigGroup cg(c, "KDEDefault");
|
||||
bool override = cg.readEntry( "ShowTitleBarStipple", true);
|
||||
cbShowStipple->setChecked( override );
|
||||
|
||||
|
@ -105,9 +106,9 @@ void KDEDefaultConfig::load( KConfig* conf )
|
|||
|
||||
|
||||
// Saves the configurable options to the kwinrc config file
|
||||
void KDEDefaultConfig::save( KConfig* conf )
|
||||
void KDEDefaultConfig::save( KConfigGroup& )
|
||||
{
|
||||
KConfigGroup cg(conf, "KDEDefault");
|
||||
KConfigGroup cg(c, "KDEDefault");
|
||||
cg.writeEntry( "ShowTitleBarStipple", cbShowStipple->isChecked() );
|
||||
cg.writeEntry( "ShowGrabBar", cbShowGrabBar->isChecked() );
|
||||
|
||||
|
|
|
@ -29,8 +29,8 @@ class KDEDefaultConfig: public QObject
|
|||
void changed();
|
||||
|
||||
public slots:
|
||||
void load( KConfig* conf );
|
||||
void save( KConfig* conf );
|
||||
void load( const KConfigGroup& conf );
|
||||
void save( KConfigGroup& conf );
|
||||
void defaults();
|
||||
|
||||
protected slots:
|
||||
|
@ -41,6 +41,7 @@ class KDEDefaultConfig: public QObject
|
|||
QCheckBox* cbShowGrabBar;
|
||||
QCheckBox* cbUseGradients;
|
||||
KVBox* gb;
|
||||
KConfig *c;
|
||||
bool highcolor;
|
||||
};
|
||||
|
||||
|
|
|
@ -53,14 +53,14 @@ KeramikConfig::KeramikConfig( KConfig* conf, QWidget* parent )
|
|||
{
|
||||
KGlobal::locale()->insertCatalog("kwin_clients");
|
||||
c = new KConfig( "kwinkeramikrc" );
|
||||
|
||||
KConfigGroup cg(c, "General");
|
||||
ui = new KeramikConfigUI( parent );
|
||||
connect( ui->showAppIcons, SIGNAL(clicked()), SIGNAL(changed()) );
|
||||
connect( ui->smallCaptions, SIGNAL(clicked()), SIGNAL(changed()) );
|
||||
connect( ui->largeGrabBars, SIGNAL(clicked()), SIGNAL(changed()) );
|
||||
connect( ui->useShadowedText, SIGNAL(clicked()), SIGNAL(changed()) );
|
||||
|
||||
load( conf );
|
||||
load( cg );
|
||||
ui->show();
|
||||
}
|
||||
|
||||
|
@ -74,7 +74,7 @@ KeramikConfig::~KeramikConfig()
|
|||
|
||||
// Loads the configurable options from the kwinrc config file
|
||||
// It is passed the open config from kwindecoration to improve efficiency
|
||||
void KeramikConfig::load( KConfig* )
|
||||
void KeramikConfig::load( const KConfigGroup& )
|
||||
{
|
||||
KConfigGroup cg(c, "General");
|
||||
ui->showAppIcons->setChecked( cg.readEntry("ShowAppIcons", true) );
|
||||
|
@ -85,7 +85,7 @@ void KeramikConfig::load( KConfig* )
|
|||
|
||||
|
||||
// Saves the configurable options to the kwinrc config file
|
||||
void KeramikConfig::save( KConfig* )
|
||||
void KeramikConfig::save( KConfigGroup& )
|
||||
{
|
||||
KConfigGroup cg(c, "General");
|
||||
cg.writeEntry( "ShowAppIcons", ui->showAppIcons->isChecked() );
|
||||
|
|
|
@ -52,8 +52,8 @@ class KeramikConfig: public QObject
|
|||
void changed();
|
||||
|
||||
public slots:
|
||||
void load( KConfig* conf );
|
||||
void save( KConfig* conf );
|
||||
void load( const KConfigGroup& conf );
|
||||
void save( KConfigGroup& conf );
|
||||
void defaults();
|
||||
|
||||
private:
|
||||
|
|
|
@ -82,7 +82,8 @@ ModernSysConfig::ModernSysConfig(KConfig* conf, QWidget* parent) : QObject(paren
|
|||
layout->addItem(new QSpacerItem(30, 10, QSizePolicy::Fixed, QSizePolicy::Fixed), 1, 0);
|
||||
layout->addWidget(sliderBox, 1, 1);
|
||||
|
||||
load(conf);
|
||||
KConfigGroup group(conf,"General");
|
||||
load(group);
|
||||
mainw->show();
|
||||
}
|
||||
|
||||
|
@ -105,7 +106,7 @@ void ModernSysConfig::slotSelectionChanged()
|
|||
}
|
||||
|
||||
|
||||
void ModernSysConfig::load(KConfig* /*conf*/)
|
||||
void ModernSysConfig::load(const KConfigGroup& /*conf*/)
|
||||
{
|
||||
KConfigGroup cg(clientrc, "General");
|
||||
bool i = cg.readEntry("ShowHandle", true);
|
||||
|
@ -119,7 +120,7 @@ void ModernSysConfig::load(KConfig* /*conf*/)
|
|||
}
|
||||
|
||||
|
||||
void ModernSysConfig::save(KConfig* /*conf*/)
|
||||
void ModernSysConfig::save(KConfigGroup& /*conf*/)
|
||||
{
|
||||
KConfigGroup cg(clientrc, "General");
|
||||
cg.writeEntry("ShowHandle", cbShowHandle->isChecked());
|
||||
|
|
|
@ -23,8 +23,8 @@ class ModernSysConfig : public QObject
|
|||
void changed();
|
||||
|
||||
public slots:
|
||||
void load(KConfig* conf);
|
||||
void save(KConfig* conf);
|
||||
void load(const KConfigGroup& conf);
|
||||
void save(KConfigGroup& conf);
|
||||
void defaults();
|
||||
|
||||
protected slots:
|
||||
|
|
|
@ -38,6 +38,7 @@ PlastikConfig::PlastikConfig(KConfig* config, QWidget* parent)
|
|||
{
|
||||
// create the configuration object
|
||||
m_config = new KConfig("kwinplastikrc");
|
||||
KConfigGroup cg(m_config, "General");
|
||||
KGlobal::locale()->insertCatalog("kwin_clients");
|
||||
|
||||
// create and show the configuration dialog
|
||||
|
@ -45,7 +46,7 @@ PlastikConfig::PlastikConfig(KConfig* config, QWidget* parent)
|
|||
m_dialog->show();
|
||||
|
||||
// load the configuration
|
||||
load(config);
|
||||
load(cg);
|
||||
|
||||
// setup the connections
|
||||
connect(m_dialog->titleAlign, SIGNAL(clicked(int)),
|
||||
|
@ -66,7 +67,7 @@ PlastikConfig::~PlastikConfig()
|
|||
delete m_config;
|
||||
}
|
||||
|
||||
void PlastikConfig::load(KConfig*)
|
||||
void PlastikConfig::load(const KConfigGroup&)
|
||||
{
|
||||
KConfigGroup cg(m_config, "General");
|
||||
|
||||
|
@ -84,7 +85,7 @@ void PlastikConfig::load(KConfig*)
|
|||
m_dialog->coloredBorder->setChecked(coloredBorder);
|
||||
}
|
||||
|
||||
void PlastikConfig::save(KConfig*)
|
||||
void PlastikConfig::save(KConfigGroup&)
|
||||
{
|
||||
KConfigGroup cg(m_config, "General");
|
||||
|
||||
|
|
|
@ -49,8 +49,8 @@ signals:
|
|||
void changed();
|
||||
|
||||
public slots:
|
||||
void load(KConfig *config);
|
||||
void save(KConfig *config);
|
||||
void load(const KConfigGroup &config);
|
||||
void save(KConfigGroup &config);
|
||||
void defaults();
|
||||
|
||||
private:
|
||||
|
|
|
@ -35,6 +35,7 @@ QuartzConfig::QuartzConfig( KConfig* conf, QWidget* parent )
|
|||
: QObject( parent )
|
||||
{
|
||||
quartzConfig = new KConfig("kwinquartzrc");
|
||||
KConfigGroup cg(quartzConfig, "General");
|
||||
KGlobal::locale()->insertCatalog("kwin_clients");
|
||||
gb = new KVBox( parent );
|
||||
cbColorBorder = new QCheckBox(
|
||||
|
@ -47,7 +48,7 @@ QuartzConfig::QuartzConfig( KConfig* conf, QWidget* parent )
|
|||
cbExtraSmall->setWhatsThis(
|
||||
i18n("Quartz window decorations with extra-small title bar.") );
|
||||
// Load configuration options
|
||||
load( conf );
|
||||
load( cg );
|
||||
|
||||
// Ensure we track user changes properly
|
||||
connect( cbColorBorder, SIGNAL(clicked()), this, SLOT(slotSelectionChanged()) );
|
||||
|
@ -73,7 +74,7 @@ void QuartzConfig::slotSelectionChanged()
|
|||
|
||||
// Loads the configurable options from the kwinrc config file
|
||||
// It is passed the open config from kwindecoration to improve efficiency
|
||||
void QuartzConfig::load( KConfig* /*conf*/ )
|
||||
void QuartzConfig::load( const KConfigGroup& /*conf*/ )
|
||||
{
|
||||
KConfigGroup cg(quartzConfig, "General");
|
||||
bool override = cg.readEntry( "UseTitleBarBorderColors", true);
|
||||
|
@ -84,7 +85,7 @@ void QuartzConfig::load( KConfig* /*conf*/ )
|
|||
|
||||
|
||||
// Saves the configurable options to the kwinrc config file
|
||||
void QuartzConfig::save( KConfig* /*conf*/ )
|
||||
void QuartzConfig::save( KConfigGroup& /*conf*/ )
|
||||
{
|
||||
KConfigGroup cg(quartzConfig, "General");
|
||||
cg.writeEntry( "UseTitleBarBorderColors", cbColorBorder->isChecked() );
|
||||
|
|
|
@ -28,8 +28,8 @@ class QuartzConfig: public QObject
|
|||
void changed();
|
||||
|
||||
public slots:
|
||||
void load( KConfig* conf );
|
||||
void save( KConfig* conf );
|
||||
void load( const KConfigGroup& conf );
|
||||
void save( KConfigGroup& conf );
|
||||
void defaults();
|
||||
|
||||
protected slots:
|
||||
|
|
|
@ -418,8 +418,8 @@ void KWinDecorationModule::resetPlugin( KConfigGroup& conf, const QString& curre
|
|||
|
||||
// connect required signals and slots together...
|
||||
connect( pluginObject, SIGNAL(changed()), this, SLOT(slotSelectionChanged()) );
|
||||
connect( this, SIGNAL(pluginLoad(KConfig*)), pluginObject, SLOT(load(KConfig*)) );
|
||||
connect( this, SIGNAL(pluginSave(KConfig*)), pluginObject, SLOT(save(KConfig*)) );
|
||||
connect( this, SIGNAL(pluginLoad(const KConfigGroup&)), pluginObject, SLOT(load(const KConfigGroup&)) );
|
||||
connect( this, SIGNAL(pluginSave(KConfigGroup &)), pluginObject, SLOT(save(KConfigGroup &)) );
|
||||
connect( this, SIGNAL(pluginDefaults()), pluginObject, SLOT(defaults()) );
|
||||
pluginConfigWidget->show();
|
||||
return;
|
||||
|
|
Loading…
Reference in a new issue