From 87124b4ccef21abb5c0b081a08aef4ce91ea7fb4 Mon Sep 17 00:00:00 2001 From: Michael Jansen Date: Sun, 1 Jun 2008 17:33:26 +0000 Subject: [PATCH] - 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 --- effects/snow_config.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/effects/snow_config.cpp b/effects/snow_config.cpp index bc00a2f564..3bda6162fe 100644 --- a/effects/snow_config.cpp +++ b/effects/snow_config.cpp @@ -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();