qt6-bb10/tests/auto/corelib
Kent Hansen 035c933eaa statemachine: Revamp property assignments implementation
In the old implementation, property assignments
(QState::assignProperty()) were "second-class citizens".
Assignments were not really integrated into the state machine
algorithm, but rather done as a separate step
(QStateMachinePrivate::applyProperties()). While that was
convenient for SCXML spec transcription purposes, it resulted
in some pretty poor semantics on the user side:

* Properties were not assigned until _after_ both the
QAbstractState::onEntry() function had been called and the
QState::entered() signal had been emitted.

* Automatic property restoration (QStateMachine::RestoreProperties)
did not play nice with nested states (and parallel states, in
particular).

The proper fix is to refactor the implementation to make
property assignments first-class in the core state machine
algorithm (QStateMachinePrivate::microstep()).

In practice, this meant splitting some steps. Instead of calling
exitStates() straight away, we now first only compute the states
to exit (without actually exiting them), and use the resulting set
to compute which properties are candidates for restoration.
Similarly, instead of calling enterStates(), we first only compute
the states to enter (without actually entering them), and use the
resulting set to compute which properties are assigned by the
entered states.

With that in place, the rest was a matter of moving the various
chunks of the old applyProperties() logic to the place where they
belong in the per-state entry/exit.

All existing autotests pass. Added several tests that verify the
desired semantics in more detail.

Task-number: QTBUG-20362
Change-Id: I7d8c7253b66cae87bb0d09aa504303218e230c65
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
2012-07-11 05:17:10 +02:00
..
animation Make animation autotests build without widgets 2012-06-07 00:39:05 +02:00
codecs Add CONFIG+=parallel_test to suspected parallel-safe tests. 2012-05-28 07:33:01 +02:00
global Avoid load(testcase) for installing test helper apps 2012-07-04 02:46:27 +02:00
io test: subtract qurlinternal.pro when private_tests are not enabled 2012-07-10 14:16:13 +02:00
itemmodels Add a Q_PROPERTY for the sourceModel of a proxy model. 2012-07-04 15:51:50 +02:00
json Fixed QJsonObject::find() 2012-06-06 02:03:11 +02:00
kernel Avoid load(testcase) for installing test helper apps 2012-07-04 02:46:27 +02:00
mimetypes QMimeType: document preferredSuffix()/suffixes() better 2012-07-08 10:37:24 +02:00
plugin make use of $$[FOO/get] properties 2012-06-19 16:39:58 +02:00
statemachine statemachine: Revamp property assignments implementation 2012-07-11 05:17:10 +02:00
thread Avoid load(testcase) for installing test helper apps 2012-07-04 02:46:27 +02:00
tools fix compilation with conforming compilers (e.g. GCC >= 4.7) 2012-07-10 03:24:15 +02:00
xml Add CONFIG+=parallel_test to suspected parallel-safe tests. 2012-05-28 07:33:01 +02:00
corelib.pro Import QMimeType / QMimeDatabase into QtCore. 2012-02-18 22:19:43 +01:00