Go to file
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
bin Make QWindowSystemInterface part of QPA API 2012-07-03 01:55:37 +02:00
config.tests android: Fix evdev configure test. 2012-07-06 00:37:39 +02:00
dist Add support for SQLSTATE error codes 2012-07-03 13:21:23 +02:00
doc Remove the MacMainWindow example. 2012-05-30 01:54:45 +02:00
examples qtbase: Add missing example installs and files. 2012-07-10 22:24:40 +02:00
lib Initial import from the monolithic Qt. 2011-04-27 12:05:43 +02:00
mkspecs add feature file for centralized qml plugin project handling 2012-07-11 02:47:16 +02:00
qmake fixed ce makefileenvironment 2012-07-06 13:58:21 +02:00
src statemachine: Revamp property assignments implementation 2012-07-11 05:17:10 +02:00
tests statemachine: Revamp property assignments implementation 2012-07-11 05:17:10 +02:00
tools configure{.exe}: enable 'tools' as a default build part 2012-07-10 08:33:49 +02:00
util QUnicodeTables: some internal API renamings 2012-06-22 09:47:59 +02:00
.gitattributes Added .tag file with Git revision. 2011-05-03 16:23:49 +02:00
.gitignore Update .gitignore to ignore mkspecs/default-host 2012-07-09 15:14:26 +02:00
.tag Added .tag file with Git revision. 2011-05-03 16:23:49 +02:00
configure configure{.exe}: enable 'tools' as a default build part 2012-07-10 08:33:49 +02:00
configure.bat Remove Q_BYTE_ORDER and -*-endian arguments from configures 2012-03-02 14:48:00 +01:00
header.BSD Remove "All rights reserved" line from license headers. 2012-01-30 03:54:59 +01:00
header.FDL Remove "All rights reserved" line from license headers. 2012-01-30 03:54:59 +01:00
header.LGPL Remove "All rights reserved" line from license headers. 2012-01-30 03:54:59 +01:00
header.LGPL-ONLY Remove "All rights reserved" line from license headers. 2012-01-30 03:54:59 +01:00
INSTALL Remove Symbian specific code from qtbase. 2012-01-31 07:08:31 +01:00
LGPL_EXCEPTION.txt Initial import from the monolithic Qt. 2011-04-27 12:05:43 +02:00
LICENSE.FDL Initial import from the monolithic Qt. 2011-04-27 12:05:43 +02:00
LICENSE.GPL Add the LICENSE.GPL file to the module referenced from license headers 2012-05-20 22:41:08 +02:00
LICENSE.LGPL Update contact information in license headers. 2012-01-23 04:04:33 +01:00
LICENSE.PREVIEW.COMMERCIAL Initial import from the monolithic Qt. 2011-04-27 12:05:43 +02:00
qtbase.pro Fix installation of syncqt. 2012-07-09 20:11:46 +02:00
sync.profile Extend the sync profile with generating forward header for qnumeric.h 2012-07-10 03:25:04 +02:00