API reviews:
flushUpdatedConstraints()->flushPendingCostraintEvents() svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=801443
This commit is contained in:
parent
4068f45cf9
commit
694c822bb0
@ -243,7 +243,7 @@ public:
|
||||
void scheduleConstraintsUpdate(Plasma::Constraints c, Applet* applet)
|
||||
{
|
||||
if (pendingConstraints == NoConstraint) {
|
||||
QTimer::singleShot(0, applet, SLOT(flushUpdatedConstraints()));
|
||||
QTimer::singleShot(0, applet, SLOT(flushPendingConstraintsEvents()));
|
||||
}
|
||||
pendingConstraints |= c;
|
||||
}
|
||||
@ -675,7 +675,7 @@ void Applet::constraintsUpdated(Plasma::Constraints constraints)
|
||||
//NOTE: do NOT put any code in here that reacts to constraints updates
|
||||
// as it will not get called for any applet that reimplements constraintsUpdated
|
||||
// without calling the Applet:: version as well, which it shouldn't need to.
|
||||
// INSTEAD put such code into flushUpdatedConstraints
|
||||
// INSTEAD put such code into flushPendingConstraintsEvents
|
||||
Q_UNUSED(constraints)
|
||||
//kDebug() << constraints << "constraints are FormFactor: " << formFactor() << ", Location: " << location();
|
||||
if (d->script) {
|
||||
@ -905,7 +905,7 @@ void Applet::checkImmutability()
|
||||
}
|
||||
}
|
||||
|
||||
void Applet::flushUpdatedConstraints()
|
||||
void Applet::flushPendingConstraintsEvents()
|
||||
{
|
||||
if (d->pendingConstraints == NoConstraint) {
|
||||
return;
|
||||
|
2
applet.h
2
applet.h
@ -571,7 +571,7 @@ class PLASMA_EXPORT Applet : public QGraphicsWidget
|
||||
* Sends all pending contraints updates to the applet. Will usually
|
||||
* be called automatically, but can also be called manually if needed.
|
||||
*/
|
||||
void flushUpdatedConstraints();
|
||||
void flushPendingConstraintsEvents();
|
||||
|
||||
/**
|
||||
* called when the Plasma::Theme has changed
|
||||
|
@ -151,7 +151,7 @@ void Containment::loadContainment(KConfigGroup* group)
|
||||
setFormFactor((Plasma::FormFactor)group->readEntry("formfactor", (int)d->formFactor));
|
||||
setScreen(group->readEntry("screen", d->screen));
|
||||
|
||||
flushUpdatedConstraints();
|
||||
flushPendingConstraintsEvents();
|
||||
//kDebug() << "Containment" << id() << "geometry is" << geometry() << "config'd with" << appletConfig.name();
|
||||
KConfigGroup applets(group, "Applets");
|
||||
|
||||
@ -550,7 +550,7 @@ void Containment::addApplet(Applet *applet, const QPointF &pos, bool delayInit)
|
||||
|
||||
applet->updateConstraints(Plasma::AllConstraints | Plasma::StartupCompletedConstraint);
|
||||
if (!delayInit) {
|
||||
applet->flushUpdatedConstraints();
|
||||
applet->flushPendingConstraintsEvents();
|
||||
emit configNeedsSaving();
|
||||
}
|
||||
|
||||
|
@ -283,7 +283,7 @@ void Corona::loadLayout(const QString& configName)
|
||||
}
|
||||
|
||||
containment->updateConstraints(Plasma::StartupCompletedConstraint);
|
||||
containment->flushUpdatedConstraints();
|
||||
containment->flushPendingConstraintsEvents();
|
||||
emit containmentAdded(containment);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user