diff options
author | Eskil Abrahamsen Blomfeldt <eblomfel@trolltech.com> | 2009-04-29 14:00:35 (GMT) |
---|---|---|
committer | Eskil Abrahamsen Blomfeldt <eblomfel@trolltech.com> | 2009-04-29 14:13:14 (GMT) |
commit | 146a63c8025d4b5a20554e067d0246df9be3e68a (patch) | |
tree | 06c0ef9ab94e276648d34a243ff1b808a82674a2 /src | |
parent | eea1c9f34b9b98c55c48f9ed1dbef9a9883c6f2a (diff) | |
download | Qt-146a63c8025d4b5a20554e067d0246df9be3e68a.zip Qt-146a63c8025d4b5a20554e067d0246df9be3e68a.tar.gz Qt-146a63c8025d4b5a20554e067d0246df9be3e68a.tar.bz2 |
SCXML defines an atomic state as a <state> with no children or <final>. However,
in SCXML it makes no sense for a <parallel> tag to be atomic, hence have no
children, whereas in a dynamic state machine you might set an atomic state as
parallel because this should govern the behavior if the state gets children
later. We decided that the most intuitive definition is that a state is
atomic if it has no children, regardless of whether it has the parallel child
mode. With the old definition, transitions from empty parallel states will
never be taken, as illustrated by the test.
Diffstat (limited to 'src')
-rw-r--r-- | src/corelib/statemachine/qstatemachine.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/corelib/statemachine/qstatemachine.cpp b/src/corelib/statemachine/qstatemachine.cpp index 8dfb229..2f8a19e 100644 --- a/src/corelib/statemachine/qstatemachine.cpp +++ b/src/corelib/statemachine/qstatemachine.cpp @@ -772,9 +772,8 @@ bool QStateMachinePrivate::isCompound(const QAbstractState *s) bool QStateMachinePrivate::isAtomic(const QAbstractState *s) { const QState *ss = qobject_cast<const QState*>(s); - return (ss && (QStatePrivate::get(ss)->childMode != QState::ParallelStates) - && QStatePrivate::get(ss)->childStates().isEmpty()) - || isFinal(s); + return (ss && QStatePrivate::get(ss)->childStates().isEmpty()) + || isFinal(s); } |