Details
-
Bug
-
Resolution: Done
-
P3: Somewhat important
-
4.8.1
-
None
-
268216570881cfc7d066d8183047d05829e1248b
Description
This is an excerpt from QStateMachinePrivate::stateEntryLessThan:
if (s1->parent() == s2->parent()) { return s1->children().indexOf(s1) < s2->children().indexOf(s2); }
Because QObject can't be its own child, when the two QAbstractState instances have same parent, method always returns (-1 < -1) => false. Apparently the correct code should be:
if (s1->parent() == s2->parent()) { return s1->parent()->children().indexOf(s1) < s2->parent()->children().indexOf(s2); }
The same fix also applies to QStateMachinePrivate::stateExitLessThan.