diff --git a/data/update_tabbox_qml_settings.cpp b/data/update_tabbox_qml_settings.cpp index 618b36f1e9..7297ffff7a 100644 --- a/data/update_tabbox_qml_settings.cpp +++ b/data/update_tabbox_qml_settings.cpp @@ -46,9 +46,11 @@ int main( int argc, char* argv[] ) KComponentData inst( &about ); Q_UNUSED( KGlobal::locale() ); // jump-start locales to get to translated descriptions KConfig config("kwinrc"); + KConfigGroup plugins = config.group("Plugins"); + const bool boxSwitchEnabled = plugins.readEntry("kwin4_effect_boxswitchEnabled", true); KConfigGroup boxswitch = config.group("Effect-BoxSwitch"); - const bool boxSwitchPrimary = boxswitch.readEntry("TabBox", true); - const bool boxSwitchAlternative = boxswitch.readEntry("TabBoxAlternative", false); + const bool boxSwitchPrimary = boxSwitchEnabled && boxswitch.hasKey("TabBox") && boxswitch.readEntry("TabBox", true); + const bool boxSwitchAlternative = boxSwitchEnabled && boxswitch.hasKey("TabBoxAlternative") && boxswitch.readEntry("TabBoxAlternative", false); boxswitch.writeEntry("TabBox", false); boxswitch.writeEntry("TabBoxAlternative", false); boxswitch.sync();