qt5base-lts/tests/auto
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
..
cmake Move the macros for invoking ctest to a shared location. 2012-07-03 01:08:25 +02:00
compilerwarnings/data Remove "All rights reserved" line from license headers. 2012-01-30 03:54:59 +01:00
concurrent Remove insignification from QtConcurrentFilter test. 2012-04-19 13:26:51 +02:00
corelib statemachine: Revamp property assignments implementation 2012-07-11 05:17:10 +02:00
dbus Make test work on Mac OS X 2012-06-23 16:25:47 +02:00
gui Color transparency support in html import/export 2012-07-10 03:24:56 +02:00
guiapplauncher
network fixed unittest builds for wince 2012-07-06 21:14:09 +02:00
opengl Mark qgl autotest as significant for Windows 2012-07-03 00:51:44 +02:00
other Remove clipboard operations from QAccessibleEditableTextInterface 2012-07-11 02:47:34 +02:00
printsupport Replace insignificant test with QEXPECT_FAIL. 2012-07-05 05:39:12 +02:00
shared Expose QPA API under qpa/* 2012-05-07 20:25:24 +02:00
sql Make sql autotests build without widgets 2012-06-07 07:25:27 +02:00
testlib Avoid load(testcase) for installing test helper apps 2012-07-04 02:46:27 +02:00
tools Update the moc no-keywords test for the signals replacement. 2012-07-09 15:55:15 +02:00
widgets QItemDelegate - add a more comprehensive test 2012-07-09 12:07:48 +02:00
xml remove some qmake -project boilerplate from project files 2012-06-19 16:39:52 +02:00
auto.pro fixed unittest builds for wince 2012-07-06 21:14:09 +02:00
network-settings.h Fix auto tests build with gcc 4.7 2012-05-23 00:42:20 +02:00
platformquirks.h Remove "All rights reserved" line from license headers. 2012-01-30 03:54:59 +01:00
test.pl Remove "All rights reserved" line from license headers. 2012-01-30 03:54:59 +01:00