path: root/src/plugins/platforms/xcb/README
diff options
authorKent Hansen <>2012-07-05 12:55:20 +0200
committerQt by Nokia <>2012-07-11 05:17:10 +0200
commit035c933eaa54c789d533a16e3c755914f68cc749 (patch)
tree52295a37726b048b9d4e6329e25fd4dd0da7d5dc /src/plugins/platforms/xcb/README
parent016695c7c79b05392daa09c1b9e07417f764e909 (diff)
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 <>
Diffstat (limited to 'src/plugins/platforms/xcb/README')
0 files changed, 0 insertions, 0 deletions