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
This commit is contained in:
parent
fd535c68e1
commit
4c3f1104b3
@ -460,10 +460,16 @@ void ContainmentPrivate::initApplets()
|
|||||||
foreach (Applet *applet, applets) {
|
foreach (Applet *applet, applets) {
|
||||||
applet->restore(*applet->d->mainConfigGroup());
|
applet->restore(*applet->d->mainConfigGroup());
|
||||||
applet->init();
|
applet->init();
|
||||||
// We have to flush the applet constraints manually
|
|
||||||
applet->flushPendingConstraintsEvents();
|
|
||||||
kDebug() << "!!{} STARTUP TIME" << QTime().msecsTo(QTime::currentTime()) << "Applet" << applet->name();
|
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)
|
void Containment::restoreContents(KConfigGroup &group)
|
||||||
|
@ -508,7 +508,6 @@ QList<Plasma::Containment *> CoronaPrivate::importLayout(const KConfigBase &conf
|
|||||||
|
|
||||||
foreach (Containment *containment, newContainments) {
|
foreach (Containment *containment, newContainments) {
|
||||||
containment->updateConstraints(Plasma::StartupCompletedConstraint);
|
containment->updateConstraints(Plasma::StartupCompletedConstraint);
|
||||||
containment->flushPendingConstraintsEvents();
|
|
||||||
containment->d->initApplets();
|
containment->d->initApplets();
|
||||||
emit q->containmentAdded(containment);
|
emit q->containmentAdded(containment);
|
||||||
kDebug() << "!!{} STARTUP TIME" << QTime().msecsTo(QTime::currentTime()) << "Containment" << containment->name();
|
kDebug() << "!!{} STARTUP TIME" << QTime().msecsTo(QTime::currentTime()) << "Containment" << containment->name();
|
||||||
|
Loading…
Reference in New Issue
Block a user