backport revision 927886
Fix regressions introduced by 914888. On the other hand, Corona::addItem indirectly calls Containment::itemChange, which ends up calling AppletPrivate::mainConfigGroup, which then creates a config group in the wrong file (plasmarc) because isContainment was not set. This also caused a regression where removed applets reappeared on next plasma run. Fix: Manually set isContainment before adding the item to the corona, then call setIsContainment with a new argument to force the initialization. svn path=/branches/KDE/4.2/kdelibs/; revision=927891
This commit is contained in:
parent
515aaf9895
commit
6ebe8f0b9f
@ -1769,9 +1769,9 @@ void Applet::lower()
|
||||
setZValue(--AppletPrivate::s_minZValue);
|
||||
}
|
||||
|
||||
void AppletPrivate::setIsContainment(bool nowIsContainment)
|
||||
void AppletPrivate::setIsContainment(bool nowIsContainment, bool forceUpdate)
|
||||
{
|
||||
if (isContainment == nowIsContainment) {
|
||||
if (isContainment == nowIsContainment && !forceUpdate) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -152,8 +152,9 @@ public:
|
||||
containment->setFormFactor(Plasma::Planar);
|
||||
}
|
||||
|
||||
static_cast<Applet*>(containment)->d->isContainment = true;
|
||||
q->addItem(containment);
|
||||
static_cast<Applet*>(containment)->d->setIsContainment(true);
|
||||
static_cast<Applet*>(containment)->d->setIsContainment(true, true);
|
||||
containments.append(containment);
|
||||
|
||||
if (!delayedInit) {
|
||||
|
@ -58,7 +58,7 @@ public:
|
||||
/**
|
||||
* Sets whether or not this Applet is acting as a Containment
|
||||
*/
|
||||
void setIsContainment(bool isContainment);
|
||||
void setIsContainment(bool isContainment, bool forceUpdate = false);
|
||||
|
||||
QString globalName() const;
|
||||
QString instanceName();
|
||||
|
Loading…
Reference in New Issue
Block a user