Fix heap-use-after-free in tst_QStateMachine::signalTransitionSenderInDifferentThread2


The test moves the state machine, and so all its states, to a new
thread, and then tries to access the QState::active bindable property
after the thread is finished. It looks like the binding storage is
already destroyed at that point, and so this results in use-after-free.

Fix the issue by only checking the signals that are detected by
QSignalSpy. Do not access the state's active state directly.

Pick-to: 6.8 6.5
Change-Id: I5bde2b278ed0366cc7c9c013707647b50112c56f
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
commit42408f2897fa7776a3bf5258fe37e9e39b3aa083
parent51301df6de444aeb731a3b131f5f2d62362b30b7
authorIvan Solovev <ivan.solovev@qt.io>
committerIvan Solovev <ivan.solovev@qt.io>
commit timeThu, 14 Nov 2024 14:32:38 +0100