diff options
author | Eskil Abrahamsen Blomfeldt <eblomfel@trolltech.com> | 2009-04-21 13:55:35 (GMT) |
---|---|---|
committer | Eskil Abrahamsen Blomfeldt <eblomfel@trolltech.com> | 2009-04-21 13:55:35 (GMT) |
commit | ae6ab698ea739ac82cc6245742b58c7265ee82f8 (patch) | |
tree | 4597334d94b2150a12adb0fe835467425cd869da /src/corelib/statemachine/qstate.h | |
parent | 381e67f03155167cd9c1c0c3c4c3905196f287df (diff) | |
download | Qt-ae6ab698ea739ac82cc6245742b58c7265ee82f8.zip Qt-ae6ab698ea739ac82cc6245742b58c7265ee82f8.tar.gz Qt-ae6ab698ea739ac82cc6245742b58c7265ee82f8.tar.bz2 |
Have QState::addTransition(QAbstractTransition*) return the transition object
when it is added. Reduces the number of temporary variables you have to declare
in your code since you can do things like:
state->addTransition(new Transition())->addAnimation(new Animation());
Could also be used for error checking.
Diffstat (limited to 'src/corelib/statemachine/qstate.h')
-rw-r--r-- | src/corelib/statemachine/qstate.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/corelib/statemachine/qstate.h b/src/corelib/statemachine/qstate.h index 4c86e02..1ec0896 100644 --- a/src/corelib/statemachine/qstate.h +++ b/src/corelib/statemachine/qstate.h @@ -81,7 +81,7 @@ public: QAbstractState *errorState() const; void setErrorState(QAbstractState *state); - void addTransition(QAbstractTransition *transition); + QAbstractTransition *addTransition(QAbstractTransition *transition); QSignalTransition *addTransition(QObject *sender, const char *signal, QAbstractState *target); QAbstractTransition *addTransition(QAbstractState *target); QStateFinishedTransition *addFinishedTransition(QAbstractState *target); |