if the Applet requests config() before being added to a containment, but is nested in another Applet, it should still use the nest-Applet's config. i doubt it is a fix for 218064, but this is at least accurate and may address comment #15.
CCBUG:218064 svn path=/trunk/KDE/kdelibs/; revision=1071437
This commit is contained in:
parent
4246f430ec
commit
30ec5b73bb
21
applet.cpp
21
applet.cpp
@ -2749,17 +2749,16 @@ KConfigGroup *AppletPrivate::mainConfigGroup()
|
|||||||
} else {
|
} else {
|
||||||
KConfigGroup appletConfig;
|
KConfigGroup appletConfig;
|
||||||
|
|
||||||
if (Containment *c = q->containment()) {
|
Containment *c = q->containment();
|
||||||
Plasma::Applet *parentApplet = qobject_cast<Applet *>(q->parent());
|
Applet *parentApplet = qobject_cast<Applet *>(q->parent());
|
||||||
if (parentApplet && parentApplet != static_cast<Applet *>(c)) {
|
if (parentApplet && parentApplet != static_cast<Applet *>(c)) {
|
||||||
// this applet is nested inside another applet! use it's config
|
// this applet is nested inside another applet! use it's config
|
||||||
// as the parent group in the config
|
// as the parent group in the config
|
||||||
appletConfig = parentApplet->config();
|
appletConfig = parentApplet->config();
|
||||||
} else {
|
appletConfig = KConfigGroup(&appletConfig, "Applets");
|
||||||
// applet directly in a Containment, as usual
|
} else if (c) {
|
||||||
appletConfig = c->config();
|
// applet directly in a Containment, as usual
|
||||||
}
|
appletConfig = c->config();
|
||||||
|
|
||||||
appletConfig = KConfigGroup(&appletConfig, "Applets");
|
appletConfig = KConfigGroup(&appletConfig, "Applets");
|
||||||
} else {
|
} else {
|
||||||
kWarning() << "requesting config for" << q->name() << "without a containment!";
|
kWarning() << "requesting config for" << q->name() << "without a containment!";
|
||||||
|
Loading…
x
Reference in New Issue
Block a user