- load() is called implicitely when the kcm is shown.
- It's not necessary to add the collection each time load is called. Prevents the shortcuts from beeing shown 2 times. Mmmhh Why here only 2times and 3times with the others? - the readSettings and writeSettings calls aren't necessary since the actionCollection contains only global shortcuts and these are saved by the kdedglobalaccel daemon (correct Andreas?). svn path=/trunk/KDE/kdebase/workspace/; revision=815404
This commit is contained in:
parent
f8b3c04066
commit
87124b4cce
1 changed files with 1 additions and 4 deletions
|
@ -65,7 +65,7 @@ SnowEffectConfig::SnowEffectConfig(QWidget* parent, const QVariantList& args) :
|
|||
a->setGlobalShortcut( KShortcut( Qt::CTRL + Qt::META + Qt::Key_F12 ));
|
||||
a->setProperty("isConfigurationAction", true);
|
||||
|
||||
load();
|
||||
m_ui->editor->addCollection(m_actionCollection);
|
||||
}
|
||||
|
||||
SnowEffectConfig::~SnowEffectConfig()
|
||||
|
@ -89,8 +89,6 @@ void SnowEffectConfig::load()
|
|||
m_ui->minSizeFlake->setValue( minFlake );
|
||||
m_ui->maxSizeFlake->setValue( maxFlake );
|
||||
|
||||
m_actionCollection->readSettings();
|
||||
m_ui->editor->addCollection(m_actionCollection);
|
||||
|
||||
emit changed(false);
|
||||
}
|
||||
|
@ -104,7 +102,6 @@ void SnowEffectConfig::save()
|
|||
conf.writeEntry("MinFlakes", m_ui->minSizeFlake->value());
|
||||
conf.writeEntry("MaxFlakes", m_ui->maxSizeFlake->value());
|
||||
|
||||
m_actionCollection->writeSettings();
|
||||
m_ui->editor->save(); // undo() will restore to this state from now on
|
||||
|
||||
conf.sync();
|
||||
|
|
Loading…
Reference in a new issue