summaryrefslogtreecommitdiffstats
path: root/src/corelib/statemachine
diff options
context:
space:
mode:
authorEskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>2009-11-03 14:19:41 +0100
committerEskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>2009-11-03 16:23:32 +0100
commitddd1c40712a6a50b0574341087118fe4db67c3b2 (patch)
treeb4392151c3ba122c7ede9439161cf1f73db5a8f7 /src/corelib/statemachine
parent19421cc33af4f439f4c7aea2de9f449987fbc420 (diff)
Rename QState::polished() signal to "propertiesAssigned"
"Polished" was never a very descriptive word, and it already has a meaning attached in the QStyle API. Additionally, "propertiesAssigned" has the benefit of giving the relation to the assignProperty() function as part of the name. Reviewed-by: Kent Hansen
Diffstat (limited to 'src/corelib/statemachine')
-rw-r--r--src/corelib/statemachine/qstate.cpp16
-rw-r--r--src/corelib/statemachine/qstate.h2
-rw-r--r--src/corelib/statemachine/qstate_p.h2
-rw-r--r--src/corelib/statemachine/qstatemachine.cpp8
4 files changed, 17 insertions, 11 deletions
diff --git a/src/corelib/statemachine/qstate.cpp b/src/corelib/statemachine/qstate.cpp
index ea206197ce..6d89248f20 100644
--- a/src/corelib/statemachine/qstate.cpp
+++ b/src/corelib/statemachine/qstate.cpp
@@ -139,10 +139,10 @@ void QStatePrivate::emitFinished()
emit q->finished();
}
-void QStatePrivate::emitPolished()
+void QStatePrivate::emitPropertiesAssigned()
{
Q_Q(QState);
- emit q->polished();
+ emit q->propertiesAssigned();
}
/*!
@@ -228,7 +228,7 @@ QList<QAbstractTransition*> QStatePrivate::transitions() const
Instructs this state to set the property with the given \a name of the given
\a object to the given \a value when the state is entered.
- \sa polished()
+ \sa propertiesAssigned()
*/
void QState::assignProperty(QObject *object, const char *name,
const QVariant &value)
@@ -491,9 +491,15 @@ bool QState::event(QEvent *e)
*/
/*!
- \fn QState::polished()
+ \fn QState::propertiesAssigned()
- This signal is emitted when all properties have been assigned their final value.
+ This signal is emitted when all properties have been assigned their final value. If the state
+ assigns a value to one or more properties for which an animation exists (either set on the
+ transition or as a default animation on the state machine), then the signal will not be emitted
+ until all such animations have finished playing.
+
+ If there are no relevant animations, or no property assignments defined for the state, then
+ the signal will be emitted immediately before the state is entered.
\sa QState::assignProperty(), QAbstractTransition::addAnimation()
*/
diff --git a/src/corelib/statemachine/qstate.h b/src/corelib/statemachine/qstate.h
index 781382d1b8..423f940452 100644
--- a/src/corelib/statemachine/qstate.h
+++ b/src/corelib/statemachine/qstate.h
@@ -94,7 +94,7 @@ public:
Q_SIGNALS:
void finished();
- void polished();
+ void propertiesAssigned();
protected:
void onEntry(QEvent *event);
diff --git a/src/corelib/statemachine/qstate_p.h b/src/corelib/statemachine/qstate_p.h
index 34c883831e..7fe6279e77 100644
--- a/src/corelib/statemachine/qstate_p.h
+++ b/src/corelib/statemachine/qstate_p.h
@@ -94,7 +94,7 @@ public:
QList<QAbstractTransition*> transitions() const;
void emitFinished();
- void emitPolished();
+ void emitPropertiesAssigned();
QAbstractState *errorState;
QAbstractState *initialState;
diff --git a/src/corelib/statemachine/qstatemachine.cpp b/src/corelib/statemachine/qstatemachine.cpp
index 0d07093207..0648d14468 100644
--- a/src/corelib/statemachine/qstatemachine.cpp
+++ b/src/corelib/statemachine/qstatemachine.cpp
@@ -807,7 +807,7 @@ void QStateMachinePrivate::applyProperties(const QList<QAbstractTransition*> &tr
if (anim->state() == QAbstractAnimation::Running) {
// The animation is still running. This can happen if the
// animation is a group, and one of its children just finished,
- // and that caused a state to emit its polished() signal, and
+ // and that caused a state to emit its propertiesAssigned() signal, and
// that triggered a transition in the machine.
// Just stop the animation so it is correctly restarted again.
anim->stop();
@@ -829,7 +829,7 @@ void QStateMachinePrivate::applyProperties(const QList<QAbstractTransition*> &tr
}
}
- // Emit polished signal for entered states that have no animated properties.
+ // Emit propertiesAssigned signal for entered states that have no animated properties.
for (int i = 0; i < enteredStates.size(); ++i) {
QState *s = qobject_cast<QState*>(enteredStates.at(i));
if (s
@@ -837,7 +837,7 @@ void QStateMachinePrivate::applyProperties(const QList<QAbstractTransition*> &tr
&& !animationsForState.contains(s)
#endif
)
- QStatePrivate::get(s)->emitPolished();
+ QStatePrivate::get(s)->emitPropertiesAssigned();
}
}
@@ -1100,7 +1100,7 @@ void QStateMachinePrivate::_q_animationFinished()
animations.removeOne(anim);
if (animations.isEmpty()) {
animationsForState.erase(it);
- QStatePrivate::get(qobject_cast<QState*>(state))->emitPolished();
+ QStatePrivate::get(qobject_cast<QState*>(state))->emitPropertiesAssigned();
}
}