Commit d75d58e6 authored by Laurent Montel's avatar Laurent Montel 😁

Save/load settings

parent 72f49b14
......@@ -78,14 +78,22 @@ ExternalComposerConfigureWidget::~ExternalComposerConfigureWidget()
void ExternalComposerConfigureWidget::loadSettings()
{
KSharedConfig::Ptr config = KSharedConfig::openConfig();
KConfigGroup group = config->group(QStringLiteral("External Composer"));
mExternalEditorCheck->setChecked(group.readEntry("Enabled", false));
mEditorRequester->setText(group.readEntry("ComposerPath", QStringLiteral("kwrite %f")));
}
void ExternalComposerConfigureWidget::saveSettings()
{
KSharedConfig::Ptr config = KSharedConfig::openConfig();
KConfigGroup group = config->group(QStringLiteral("External Composer"));
group.writeEntry("Enabled", mExternalEditorCheck->isChecked());
group.writeEntry("ComposerPath", mEditorRequester->text());
}
void ExternalComposerConfigureWidget::resetSettings()
{
mExternalEditorCheck->setChecked(false);
//kwrite %f
mEditorRequester->setText(QStringLiteral("kwrite %f"));
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment