diff --git a/src/plugins/autotest/testrunner.cpp b/src/plugins/autotest/testrunner.cpp index 65508c69c29..65e23223368 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 48d9f2ecab9..4dfb744a256 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; };