- 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 3 times.
    - the readSettings and writeSettings calls aren't necessary since the
      actionCollection contains only global shortcuts and these are saved by
      the kdedglobalaccel daemon.

svn path=/trunk/KDE/kdebase/workspace/; revision=815403
This commit is contained in:
Michael Jansen 2008-06-01 17:33:23 +00:00
parent 08a0d13288
commit f8b3c04066

View file

@ -77,7 +77,7 @@ MagnifierEffectConfig::MagnifierEffectConfig(QWidget* parent, const QVariantList
a->setGlobalShortcut(KShortcut(Qt::META + Qt::Key_0)); a->setGlobalShortcut(KShortcut(Qt::META + Qt::Key_0));
a->setProperty("isConfigurationAction", true); a->setProperty("isConfigurationAction", true);
load(); m_ui->editor->addCollection(m_actionCollection);
} }
MagnifierEffectConfig::~MagnifierEffectConfig() MagnifierEffectConfig::~MagnifierEffectConfig()
@ -98,8 +98,6 @@ void MagnifierEffectConfig::load()
m_ui->spinWidth->setValue(width); m_ui->spinWidth->setValue(width);
m_ui->spinHeight->setValue(height); m_ui->spinHeight->setValue(height);
m_actionCollection->readSettings();
m_ui->editor->addCollection(m_actionCollection);
emit changed(false); emit changed(false);
} }
@ -114,7 +112,6 @@ void MagnifierEffectConfig::save()
conf.writeEntry("Width", m_ui->spinWidth->value()); conf.writeEntry("Width", m_ui->spinWidth->value());
conf.writeEntry("Height", m_ui->spinHeight->value()); conf.writeEntry("Height", m_ui->spinHeight->value());
m_actionCollection->writeSettings();
m_ui->editor->save(); // undo() will restore to this state from now on m_ui->editor->save(); // undo() will restore to this state from now on
conf.sync(); conf.sync();