diff options
author | Christian Stenger <christian.stenger@qt.io> | 2019-12-11 15:15:01 +0100 |
---|---|---|
committer | Christian Stenger <christian.stenger@qt.io> | 2019-12-19 10:13:28 +0000 |
commit | 62fd36847340c2eeeb3361a5d84bdfba4972f0f4 (patch) | |
tree | 08451ebc934c585fb973c84845f7420355def97e | |
parent | ae29b2794bab8dd04ab3841cd3af506fc8728df5 (diff) | |
download | qt-creator-62fd36847340c2eeeb3361a5d84bdfba4972f0f4.tar.gz |
AutoTest: Fix stopping test debug run
If the Debugger gets into a corrupted state and is not
stopable cleanly we do not get the stopped signal.
This in turn leaves the test runner in an inconsistent
state which cannot be reset except with a restart of Qt Creator.
Fixes: QTCREATORBUG-23298
Change-Id: I9d7e7cbc847f8883d2e750f4436c5ef281106d3a
Reviewed-by: David Schulz <david.schulz@qt.io>
-rw-r--r-- | src/plugins/autotest/testrunner.cpp | 2 | ||||
-rw-r--r-- | src/plugins/autotest/testrunner.h | 1 |
2 files changed, 3 insertions, 0 deletions
diff --git a/src/plugins/autotest/testrunner.cpp b/src/plugins/autotest/testrunner.cpp index 65508c69c2..65e2322336 100644 --- a/src/plugins/autotest/testrunner.cpp +++ b/src/plugins/autotest/testrunner.cpp @@ -627,6 +627,7 @@ void TestRunner::debugTests() runControl, &RunControl::initiateStop); connect(runControl, &RunControl::stopped, this, &TestRunner::onFinished); + m_finishDebugConnect = connect(runControl, &RunControl::finished, this, &TestRunner::onFinished); ProjectExplorerPlugin::startRunControl(runControl); if (useOutputProcessor && AutotestPlugin::settings()->popupOnStart) AutotestPlugin::popupResultsPane(); @@ -723,6 +724,7 @@ void TestRunner::onFinished() m_selectedTests.clear(); disconnect(m_stopDebugConnect); + disconnect(m_finishDebugConnect); disconnect(m_targetConnect); m_fakeFutureInterface = nullptr; m_runMode = TestRunMode::None; diff --git a/src/plugins/autotest/testrunner.h b/src/plugins/autotest/testrunner.h index 48d9f2ecab..4dfb744a25 100644 --- a/src/plugins/autotest/testrunner.h +++ b/src/plugins/autotest/testrunner.h @@ -108,6 +108,7 @@ private: QMetaObject::Connection m_buildConnect; // temporarily used when debugging QMetaObject::Connection m_stopDebugConnect; + QMetaObject::Connection m_finishDebugConnect; // temporarily used for handling of switching the current target QMetaObject::Connection m_targetConnect; }; |