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(); + } } }