KIO actually uses "alwaysAsk", "execute", and "open" as possible values.
When reading the setting, map unknown values to "open" like KIO does.
That also provides compatibility with older dolphin versions.
BUG: 421294
FIXED-IN: 20.04.3
scriptExecutionGroup.writeEntry("behaviourOnLaunch", "alwaysAsk");
break;
case ScriptExecution::Open:
scriptExecutionGroup.writeEntry("behaviourOnLaunch", "alwaysAsk");
break;
case ScriptExecution::Open:
- scriptExecutionGroup.writeEntry("behaviourOnLaunch", "dontAsk");
+ scriptExecutionGroup.writeEntry("behaviourOnLaunch", "open");
break;
case ScriptExecution::Execute:
scriptExecutionGroup.writeEntry("behaviourOnLaunch", "execute");
break;
case ScriptExecution::Execute:
scriptExecutionGroup.writeEntry("behaviourOnLaunch", "execute");
const KConfigGroup scriptExecutionGroup(KSharedConfig::openConfig(QStringLiteral("kiorc")), "Executable scripts");
const QString value = scriptExecutionGroup.readEntry("behaviourOnLaunch", "alwaysAsk");
const KConfigGroup scriptExecutionGroup(KSharedConfig::openConfig(QStringLiteral("kiorc")), "Executable scripts");
const QString value = scriptExecutionGroup.readEntry("behaviourOnLaunch", "alwaysAsk");
- if (value == QLatin1String("dontAsk")) {
- m_confirmScriptExecution->setCurrentIndex(ScriptExecution::Open);
+ if (value == QLatin1String("alwaysAsk")) {
+ m_confirmScriptExecution->setCurrentIndex(ScriptExecution::AlwaysAsk);
} else if (value == QLatin1String("execute")) {
m_confirmScriptExecution->setCurrentIndex(ScriptExecution::Execute);
} else if (value == QLatin1String("execute")) {
m_confirmScriptExecution->setCurrentIndex(ScriptExecution::Execute);
- } else /* if (value == QLatin1String("alwaysAsk"))*/ {
- m_confirmScriptExecution->setCurrentIndex(ScriptExecution::AlwaysAsk);
+ } else /* if (value == QLatin1String("open"))*/ {
+ m_confirmScriptExecution->setCurrentIndex(ScriptExecution::Open);
}
m_confirmClosingMultipleTabs->setChecked(GeneralSettings::confirmClosingMultipleTabs());
}
m_confirmClosingMultipleTabs->setChecked(GeneralSettings::confirmClosingMultipleTabs());