[Development] Semantics of QState when state machine execution is stopped

Stottlemyer, Brett (B.S.) bstottle at ford.com
Mon Jul 7 02:52:23 CEST 2014


Kevin Funk wrote:
> 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)?

Maybe I'm misunderstanding the problem, but I'd think the most common use cases are 
1) a continuous state machine, where stopping is an abnormal state, so emitting a new signal could be a problem.
2) a state machine that is terminated by a QFinalState, when stop() could be called from a connection to the QFinalState onEntered.

I'm fine with triggering onExited as well, just worried that may have more impact.

Brett


More information about the Development mailing list