[Development] Semantics of QState when state machine execution is stopped
bog_dan_ro at yahoo.com
Mon Jul 7 08:55:14 CEST 2014
>> I presume that changing the semantics here (i.e. triggering QAbstractState::onExited when the machine is stopped) isn't appropriate,
>> as it may break existing applications, but I'm not exactly sure.
>I think it would be far less risk of breaking existing applications to simply set active = false on all active states when the machine is stopped. Does that not address the problematic use case(s)?
It will be inconsistent, because when you stop a state machine the state will become inactive but it remains entered ... activeChanged entered and exited signals are describing the same thing: if the current state is active or not. But when the state machine is stopped any active state can't remain active. So, IMHO the fact that exited signal is not emitted when a state machine is stopped is a bug and should be fixed.
More information about the Development