From 4c3f1104b35dcce0a05fc3e650614e6d68e24627 Mon Sep 17 00:00:00 2001 From: "Aaron J. Seigo" Date: Thu, 10 Jun 2010 17:07:50 +0000 Subject: [PATCH] when initializing the applets, restore from config, then init, then flush the containment's constraints, then flush the applet's constraints. ensures that constraint events always happen after both restoration and initialization of the applet BUG:241298 svn path=/trunk/KDE/kdelibs/; revision=1136767 --- containment.cpp | 10 ++++++++-- corona.cpp | 1 - 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/containment.cpp b/containment.cpp index 6dc73c1be..c86c1ebe2 100644 --- a/containment.cpp +++ b/containment.cpp @@ -460,10 +460,16 @@ void ContainmentPrivate::initApplets() foreach (Applet *applet, applets) { applet->restore(*applet->d->mainConfigGroup()); applet->init(); - // We have to flush the applet constraints manually - applet->flushPendingConstraintsEvents(); kDebug() << "!!{} STARTUP TIME" << QTime().msecsTo(QTime::currentTime()) << "Applet" << applet->name(); } + + q->flushPendingConstraintsEvents(); + + foreach (Applet *applet, applets) { + applet->flushPendingConstraintsEvents(); + } + + kDebug() << "!!{} STARTUP TIME" << QTime().msecsTo(QTime::currentTime()) << "Containment's applets initialized" << q->name(); } void Containment::restoreContents(KConfigGroup &group) diff --git a/corona.cpp b/corona.cpp index 500a5a4f0..2b1baf08b 100644 --- a/corona.cpp +++ b/corona.cpp @@ -508,7 +508,6 @@ QList CoronaPrivate::importLayout(const KConfigBase &conf foreach (Containment *containment, newContainments) { containment->updateConstraints(Plasma::StartupCompletedConstraint); - containment->flushPendingConstraintsEvents(); containment->d->initApplets(); emit q->containmentAdded(containment); kDebug() << "!!{} STARTUP TIME" << QTime().msecsTo(QTime::currentTime()) << "Containment" << containment->name();