Fix typos in QState sorting functions
authorKent Hansen <kent.hansen@nokia.com>
Thu, 31 May 2012 10:17:02 +0000 (12:17 +0200)
committerQt by Nokia <qt-info@nokia.com>
Mon, 4 Jun 2012 14:50:24 +0000 (16:50 +0200)
commit268216570881cfc7d066d8183047d05829e1248b
tree3f5fd5b80a0d25fa7ebbfb1e72a1bfea9c3ffc74
parent939aa5113859768f058ed663a10e26f82a5db287
Fix typos in QState sorting functions

A QObject can't be a child of itself, so the comparison always
returned false. In practice, this was causing the entry/exit order
of parallel states to be random.

QObject::children() is documented to contain the children in the
order in which they were added, so this fix actually achieves
deterministic behavior.

Task-number: QTBUG-25959
Change-Id: Id3f12d6bfbc249f1d4fed0bafb7d0217093e458e
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
src/corelib/statemachine/qstatemachine.cpp
tests/auto/corelib/statemachine/qstatemachine/tst_qstatemachine.cpp