allow applet configuration and extenderitems config nested into the
group of another applet this thing is possibly dangerous, so better plasma-devel is informed CCMAIL:plasma-devel@kde.org svn path=/trunk/KDE/kdelibs/; revision=989520
This commit is contained in:
parent
f639993c8b
commit
c906b58d08
@ -2108,6 +2108,7 @@ void Applet::timerEvent(QTimerEvent *event)
|
|||||||
d->modificationsTimerId = 0;
|
d->modificationsTimerId = 0;
|
||||||
// invalid group, will result in save using the default group
|
// invalid group, will result in save using the default group
|
||||||
KConfigGroup cg;
|
KConfigGroup cg;
|
||||||
|
|
||||||
save(cg);
|
save(cg);
|
||||||
emit configNeedsSaving();
|
emit configNeedsSaving();
|
||||||
}
|
}
|
||||||
@ -2408,7 +2409,10 @@ KConfigGroup *AppletPrivate::mainConfigGroup()
|
|||||||
mainConfig = new KConfigGroup(&containmentConfig, QString::number(appletId));
|
mainConfig = new KConfigGroup(&containmentConfig, QString::number(appletId));
|
||||||
} else {
|
} else {
|
||||||
KConfigGroup appletConfig;
|
KConfigGroup appletConfig;
|
||||||
if (q->containment()) {
|
Plasma::Applet *parentApplet = qobject_cast<Plasma::Applet *>(q->parent());
|
||||||
|
if (parentApplet && q->containment() && parentApplet != q->containment()) {
|
||||||
|
appletConfig = KConfigGroup(&parentApplet->config(), "Applets");
|
||||||
|
} else if (q->containment()) {
|
||||||
appletConfig = q->containment()->config();
|
appletConfig = q->containment()->config();
|
||||||
appletConfig = KConfigGroup(&appletConfig, "Applets");
|
appletConfig = KConfigGroup(&appletConfig, "Applets");
|
||||||
} else {
|
} else {
|
||||||
|
@ -662,6 +662,7 @@ void ExtenderPrivate::loadExtenderItems()
|
|||||||
item = new ExtenderItem(q, extenderItemId.toInt());
|
item = new ExtenderItem(q, extenderItemId.toInt());
|
||||||
}
|
}
|
||||||
sourceApplet->initExtenderItem(item);
|
sourceApplet->initExtenderItem(item);
|
||||||
|
item->d->sourceApplet = sourceApplet;
|
||||||
|
|
||||||
if (temporarySourceApplet) {
|
if (temporarySourceApplet) {
|
||||||
delete sourceApplet;
|
delete sourceApplet;
|
||||||
|
Loading…
Reference in New Issue
Block a user