summaryrefslogtreecommitdiffstats
path: root/src/corelib/statemachine/qstate.cpp
diff options
context:
space:
mode:
authorKent Hansen <khansen@trolltech.com>2009-05-12 16:38:32 (GMT)
committerKent Hansen <khansen@trolltech.com>2009-05-12 16:38:32 (GMT)
commit09d1e6ee7d93c9fb658b2be5fe49698bf3faa0d6 (patch)
tree2e68a3b01279934464acf98dd774b90659573dc6 /src/corelib/statemachine/qstate.cpp
parent3db6f6234eb36ec4b3d6e14dc48917762653cbd7 (diff)
downloadQt-09d1e6ee7d93c9fb658b2be5fe49698bf3faa0d6.zip
Qt-09d1e6ee7d93c9fb658b2be5fe49698bf3faa0d6.tar.gz
Qt-09d1e6ee7d93c9fb658b2be5fe49698bf3faa0d6.tar.bz2
correctly handle multiple signal transitions for same (object,signal)
The signal was not disconnected at the right time. We now store the number of active signal transitions for a particular (object,signal) and only disconnect when the count drops to zero.
Diffstat (limited to 'src/corelib/statemachine/qstate.cpp')
-rw-r--r--src/corelib/statemachine/qstate.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/corelib/statemachine/qstate.cpp b/src/corelib/statemachine/qstate.cpp
index 3a3bfc3..f1528b8 100644
--- a/src/corelib/statemachine/qstate.cpp
+++ b/src/corelib/statemachine/qstate.cpp
@@ -327,6 +327,8 @@ QAbstractTransition *QState::addTransition(QAbstractTransition *transition)
}
}
transition->setParent(this);
+ if (machine() != 0 && machine()->configuration().contains(this))
+ QStateMachinePrivate::get(machine())->registerTransitions(this);
return transition;
}