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)
|
void Containment::restoreContents(KConfigGroup &group)
|
||||||
{
|
{
|
||||||
KConfigGroup applets(&group, "Applets");
|
KConfigGroup applets(&group, "Applets");
|
||||||
@ -479,10 +490,7 @@ void Containment::restoreContents(KConfigGroup &group)
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
Applet *applet = d->addApplet(plugin, QVariantList(),
|
d->addApplet(plugin, QVariantList(), appletConfig.readEntry("geometry", QRectF()), appId, true);
|
||||||
appletConfig.readEntry("geometry", QRectF()),
|
|
||||||
appId, true);
|
|
||||||
applet->restore(appletConfig);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -508,15 +508,9 @@ QList<Plasma::Containment *> CoronaPrivate::importLayout(const KConfigBase &conf
|
|||||||
}
|
}
|
||||||
|
|
||||||
foreach (Containment *containment, newContainments) {
|
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->updateConstraints(Plasma::StartupCompletedConstraint);
|
||||||
containment->flushPendingConstraintsEvents();
|
containment->flushPendingConstraintsEvents();
|
||||||
|
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();
|
||||||
}
|
}
|
||||||
|
@ -81,6 +81,7 @@ public:
|
|||||||
*/
|
*/
|
||||||
void containmentConstraintsEvent(Plasma::Constraints constraints);
|
void containmentConstraintsEvent(Plasma::Constraints constraints);
|
||||||
|
|
||||||
|
void initApplets();
|
||||||
void checkContainmentFurniture();
|
void checkContainmentFurniture();
|
||||||
bool regionIsEmpty(const QRectF ®ion, Applet *ignoredApplet=0) const;
|
bool regionIsEmpty(const QRectF ®ion, Applet *ignoredApplet=0) const;
|
||||||
void positionPanel(bool force = false);
|
void positionPanel(bool force = false);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user