qt5base-lts/tests/auto/corelib/statemachine
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
..
qstate Updated license headers 2016-01-21 18:55:18 +00:00
qstatemachine Fix crash in tst_QStateMachine::dontProcessSlotsWhenMachineIsNotRunning 2018-02-14 08:12:20 +00:00
statemachine.pro Moving relevant tests to corelib/statemachine 2011-09-01 12:54:42 +02:00