Fix issue with 'Run*'/'Stop' actions...

...when canceling the 'Save Changes' dialog. The test run was
canceled before the build, so the 'Run*' and 'Stop' actions stayed
in a wrong state forever.

Change-Id: I535c50a25c149da32123f832dc6575d1c0fe9643
Reviewed-by: Niels Weber <niels.weber@theqtcompany.com>
This commit is contained in:
Christian Stenger
2016-01-20 09:38:26 +01:00
parent 166bf38a11
commit ab8970f0ef

View File

@@ -217,6 +217,13 @@ static void performTestRun(QFutureInterface<TestResult *> &futureInterface,
void TestRunner::prepareToRunTests()
{
ProjectExplorer::Internal::ProjectExplorerSettings projectExplorerSettings =
ProjectExplorer::ProjectExplorerPlugin::projectExplorerSettings();
if (projectExplorerSettings.buildBeforeDeploy && !projectExplorerSettings.saveBeforeBuild) {
if (!ProjectExplorer::ProjectExplorerPlugin::saveModifiedFiles())
return;
}
const bool omitRunConfigWarnings = AutotestPlugin::instance()->settings()->omitRunConfigWarn;
m_executingTests = true;
@@ -250,8 +257,6 @@ void TestRunner::prepareToRunTests()
return;
}
ProjectExplorer::Internal::ProjectExplorerSettings projectExplorerSettings =
ProjectExplorer::ProjectExplorerPlugin::projectExplorerSettings();
if (!projectExplorerSettings.buildBeforeDeploy) {
runTests();
} else {