Fix QScxmlStateMachineLoader::source binding loop
The QScxmlStateMachineLoader::source setter assumes that the loader is
managed by a QML engine, so use a helper QML file and a QQmlComponent
to create a helper object and run the test for binding loops.
The binding loop here is a bit tricky, as the source setter modifies
two properties: source and stateMachine.
The fix for the source property is trivial.
The stateMachine property is read-only, so modify the
setStateMachine() internal setter in such way that it does not create
bindings. After that, manually call notify() if the state machine
has changed.
Use simpler state machines in the test, because the original ones
were generating the ASAN memleak warnings from scxml compiler.
Task-number: QTBUG-116542
Pick-to: 6.6 6.5
Change-Id: Ia8427ed07c1e63e5740b2f0817fe6b2cb48726b8
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>