qt5base-lts/tests/auto/corelib/statemachine/qstatemachine
Kari Oikarinen a37dd93def Fix crash in tst_QStateMachine::dontProcessSlotsWhenMachineIsNotRunning
The test sometimes ended up with:

  QThread: Destroyed while thread is still running
  Received a fatal error.

This was because as a member variable of the local struct the QThread object was
sometimes destructed before the signal connection quitting it was handled. Fix
that by making sure that the thread is finished before finishing the test.

Also moved connecting to the state machine's signal to be before starting the
machine. Because the counting of QStateMachine::finished signal could hit 1
after the first signal is emitted and the test could pass without the code
working, check that both of the signals have been emitted.

Task-number: QTBUG-66372
Task-number: QTBUG-66216
Change-Id: If14141e39f37541032ddd8c6471daf40a77b0469
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
2018-02-14 08:12:20 +00:00
..
qstatemachine.pro Tests: Remove CONFIG += parallel_test. 2015-09-05 07:16:50 +00:00
tst_qstatemachine.cpp Fix crash in tst_QStateMachine::dontProcessSlotsWhenMachineIsNotRunning 2018-02-14 08:12:20 +00:00