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:
Marco Martin 2009-06-30 13:32:40 +00:00
parent f639993c8b
commit c906b58d08
2 changed files with 6 additions and 1 deletions

View File

@ -2108,6 +2108,7 @@ void Applet::timerEvent(QTimerEvent *event)
d->modificationsTimerId = 0;
// invalid group, will result in save using the default group
KConfigGroup cg;
save(cg);
emit configNeedsSaving();
}
@ -2408,7 +2409,10 @@ KConfigGroup *AppletPrivate::mainConfigGroup()
mainConfig = new KConfigGroup(&containmentConfig, QString::number(appletId));
} else {
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 = KConfigGroup(&appletConfig, "Applets");
} else {

View File

@ -662,6 +662,7 @@ void ExtenderPrivate::loadExtenderItems()
item = new ExtenderItem(q, extenderItemId.toInt());
}
sourceApplet->initExtenderItem(item);
item->d->sourceApplet = sourceApplet;
if (temporarySourceApplet) {
delete sourceApplet;