Enter initial state before QStateMachine::started() is emitted
authorKent Hansen <kent.hansen@nokia.com>
Thu, 31 May 2012 11:33:14 +0000 (13:33 +0200)
committerQt by Nokia <qt-info@nokia.com>
Mon, 4 Jun 2012 14:53:42 +0000 (16:53 +0200)
commitf7c2ba9bbe764a3f21da3fdc6a1e1c6c6da85a8f
tree6ecbd3442e7a78292842bc4bc0c6333501a54211
parent268216570881cfc7d066d8183047d05829e1248b
Enter initial state before QStateMachine::started() is emitted

The documentation says that started() "is emitted when the state
machine has entered its initial state", but the implementation
didn't adhere to that.

The consequence is that if you e.g. emitted a signal from a slot
connected to started(), and that signal was used by a transition
from the initial state, the signal would effectively get ignored and
the state machine would remain in the initial state.

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