Correctly save behaviourOnLaunch

Summary:
We only wrote out a checkbox value if the checkbox was checked.
Unchecking it would not do anything.

BUG: 398022

Test Plan:
Read KRun's exepcted values
Unchecked config option
Reloaded dolphin
Checkbox remained off

Reviewers: #dolphin, ngraham, elvisangelaccio

Reviewed By: #dolphin, ngraham, elvisangelaccio

Subscribers: ngraham, kfm-devel

Tags: #dolphin

Differential Revision: https://phabricator.kde.org/D15147
This commit is contained in:
David Edmundson 2018-09-04 14:20:33 +02:00
parent b734386cbc
commit 5f252da8b5

View file

@ -92,13 +92,14 @@ void ConfirmationsSettingsPage::applySettings()
confirmationGroup.writeEntry("ConfirmTrash", m_confirmMoveToTrash->isChecked());
confirmationGroup.writeEntry("ConfirmEmptyTrash", m_confirmEmptyTrash->isChecked());
confirmationGroup.writeEntry("ConfirmDelete", m_confirmDelete->isChecked());
confirmationGroup.sync();
KConfigGroup scriptExecutionGroup(kioConfig, "Executable scripts");
if (m_confirmScriptExecution->isChecked()) {
KConfigGroup scriptExecutionGroup(kioConfig, "Executable scripts");
scriptExecutionGroup.writeEntry("behaviourOnLaunch", "alwaysAsk");
scriptExecutionGroup.sync();
} else {
scriptExecutionGroup.writeEntry("behaviourOnLaunch", "dontAsk");
}
kioConfig->sync();
GeneralSettings* settings = GeneralSettings::self();
settings->setConfirmClosingMultipleTabs(m_confirmClosingMultipleTabs->isChecked());