From d2a0b13252683a275c4e8f48b6ff07b4eaebfee9 Mon Sep 17 00:00:00 2001 From: hjk Date: Tue, 13 Aug 2019 15:25:45 +0200 Subject: [PATCH] AutoTest/ProjectExplorer: Move some unusual function towards only user Change-Id: I1101a21871c8b1eac5c01afc033e5416850bc794 Reviewed-by: Christian Stenger --- src/plugins/autotest/testrunner.cpp | 8 +++++++- src/plugins/projectexplorer/project.cpp | 5 ----- src/plugins/projectexplorer/project.h | 2 -- 3 files changed, 7 insertions(+), 8 deletions(-) diff --git a/src/plugins/autotest/testrunner.cpp b/src/plugins/autotest/testrunner.cpp index bd5a5f1388a..2260a4c2899 100644 --- a/src/plugins/autotest/testrunner.cpp +++ b/src/plugins/autotest/testrunner.cpp @@ -37,6 +37,7 @@ #include #include +#include #include #include #include @@ -65,6 +66,7 @@ #include +using namespace ProjectExplorer; using namespace Utils; namespace Autotest { @@ -340,7 +342,11 @@ void TestRunner::prepareToRunTests(TestRunMode mode) if (!projectExplorerSettings.buildBeforeDeploy || mode == TestRunMode::DebugWithoutDeploy || mode == TestRunMode::RunWithoutDeploy) { runOrDebugTests(); - } else if (project->hasActiveBuildSettings()) { + return; + } + + Target *target = project->activeTarget(); + if (target && BuildConfigurationFactory::find(target)) { buildProject(project); } else { reportResult(ResultType::MessageFatal, diff --git a/src/plugins/projectexplorer/project.cpp b/src/plugins/projectexplorer/project.cpp index ccf2f59247e..158863d39a2 100644 --- a/src/plugins/projectexplorer/project.cpp +++ b/src/plugins/projectexplorer/project.cpp @@ -249,11 +249,6 @@ Utils::FilePath Project::projectFilePath() const return document()->filePath(); } -bool Project::hasActiveBuildSettings() const -{ - return activeTarget() && BuildConfigurationFactory::find(activeTarget()); -} - void Project::addTarget(std::unique_ptr &&t) { auto pointer = t.get(); diff --git a/src/plugins/projectexplorer/project.h b/src/plugins/projectexplorer/project.h index 4dfe1b2adc1..1af8e6c34fe 100644 --- a/src/plugins/projectexplorer/project.h +++ b/src/plugins/projectexplorer/project.h @@ -116,8 +116,6 @@ public: virtual ProjectNode *rootProjectNode() const; ContainerNode *containerNode() const; - bool hasActiveBuildSettings() const; - // EditorConfiguration: EditorConfiguration *editorConfiguration() const;