[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: branches/KDE/4.5/kdelibs/plasma
From: Aaron J. Seigo <aseigo () kde ! org>
Date: 2010-08-28 7:35:38
Message-ID: 20100828073538.F104DAC857 () svn ! kde ! org
[Download RAW message or body]
SVN commit 1169026 by aseigo:
backport: remove any stale config data to avoid accidentally merging old and existing containment configs
M +11 -1 corona.cpp
--- branches/KDE/4.5/kdelibs/plasma/corona.cpp #1169025:1169026
@@ -230,6 +230,14 @@
containment->setFormFactor(Plasma::Planar);
}
+ // if this is a new containment, we need to ensure that there are no stale
+ // configuration data around
+ if (id == 0) {
+ KConfigGroup conf(q->config(), "Containments");
+ conf = KConfigGroup(&conf, QString::number(containment->id()));
+ conf.deleteGroup();
+ }
+
applet->d->isContainment = true;
containment->setPos(containment->d->preferredPos(q));
q->addItem(containment);
@@ -447,7 +455,7 @@
}
KSharedConfigPtr conf = config();
- d->importLayout(*conf, conf != config());
+ d->importLayout(*conf, false);
}
QList<Plasma::Containment *> Corona::importLayout(const KConfigBase &conf)
@@ -489,6 +497,8 @@
if (mergeConfig) {
KConfigGroup realConf(q->config(), "Containments");
realConf = KConfigGroup(&realConf, QString::number(cid));
+ // in case something was there before us
+ realConf.deleteGroup();
containmentConfig.copyTo(&realConf);
}
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic