From b6ac8ded885f88f5df56c9b48193655372dc1356 Mon Sep 17 00:00:00 2001 From: Marco Martin Date: Wed, 4 Jun 2014 17:25:38 +0200 Subject: [PATCH] forcefully remove some entries newly created containments may have some default entries like plugin or formfactor written in the config group, but not in keyList() they have to be explicitly removed because wouldn't be removed in deleteGroup BUG:335792 --- src/plasma/private/applet_p.cpp | 23 ++++++++++++++++------- 1 file changed, 16 insertions(+), 7 deletions(-) diff --git a/src/plasma/private/applet_p.cpp b/src/plasma/private/applet_p.cpp index 3b6612de3..c72315280 100644 --- a/src/plasma/private/applet_p.cpp +++ b/src/plasma/private/applet_p.cpp @@ -446,17 +446,26 @@ void AppletPrivate::resetConfigurationObject() { // make sure mainConfigGroup exists in all cases mainConfigGroup(); - + mainConfig->deleteEntry("plugin"); + mainConfig->deleteEntry("formfactor"); + mainConfig->deleteEntry("immutability"); + mainConfig->deleteEntry("location"); mainConfig->deleteGroup(); delete mainConfig; mainConfig = 0; - if (!q->containment()) { - return; - } - Corona *corona = q->containment()->corona(); - if (corona) { - corona->requireConfigSync(); + Containment *cont = qobject_cast(q); + + if (cont && cont->corona()) { + cont->corona()->requireConfigSync(); + } else { + if (!q->containment()) { + return; + } + Corona *corona = q->containment()->corona(); + if (corona) { + corona->requireConfigSync(); + } } }