put all the applet restore/init code in one place so that the order of ops is more obvious when debugging
svn path=/trunk/KDE/kdelibs/; revision=1134668
This commit is contained in:
parent
1d23580ea7
commit
1f0ecedca3
@ -455,6 +455,17 @@ void Containment::saveContents(KConfigGroup &group) const
|
||||
}
|
||||
}
|
||||
|
||||
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();
|
||||
}
|
||||
}
|
||||
|
||||
void Containment::restoreContents(KConfigGroup &group)
|
||||
{
|
||||
KConfigGroup applets(&group, "Applets");
|
||||
@ -479,10 +490,7 @@ void Containment::restoreContents(KConfigGroup &group)
|
||||
continue;
|
||||
}
|
||||
|
||||
Applet *applet = d->addApplet(plugin, QVariantList(),
|
||||
appletConfig.readEntry("geometry", QRectF()),
|
||||
appId, true);
|
||||
applet->restore(appletConfig);
|
||||
d->addApplet(plugin, QVariantList(), appletConfig.readEntry("geometry", QRectF()), appId, true);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -508,15 +508,9 @@ QList<Plasma::Containment *> CoronaPrivate::importLayout(const KConfigBase &conf
|
||||
}
|
||||
|
||||
foreach (Containment *containment, newContainments) {
|
||||
foreach (Applet *applet, containment->applets()) {
|
||||
applet->init();
|
||||
// We have to flush the applet constraints manually
|
||||
applet->flushPendingConstraintsEvents();
|
||||
kDebug() << "!!{} STARTUP TIME" << QTime().msecsTo(QTime::currentTime()) << "Applet" << applet->name();
|
||||
}
|
||||
|
||||
containment->updateConstraints(Plasma::StartupCompletedConstraint);
|
||||
containment->flushPendingConstraintsEvents();
|
||||
containment->d->initApplets();
|
||||
emit q->containmentAdded(containment);
|
||||
kDebug() << "!!{} STARTUP TIME" << QTime().msecsTo(QTime::currentTime()) << "Containment" << containment->name();
|
||||
}
|
||||
|
@ -81,6 +81,7 @@ public:
|
||||
*/
|
||||
void containmentConstraintsEvent(Plasma::Constraints constraints);
|
||||
|
||||
void initApplets();
|
||||
void checkContainmentFurniture();
|
||||
bool regionIsEmpty(const QRectF ®ion, Applet *ignoredApplet=0) const;
|
||||
void positionPanel(bool force = false);
|
||||
|
Loading…
x
Reference in New Issue
Block a user