forked from qt-creator/qt-creator
ProjectExplorer: Make settings access more direct
A step towards aspectification. Change-Id: Iabf5e56e993449dc482d1d2ab6eeb2885243ab3e Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
@@ -23,7 +23,6 @@
|
||||
#include <projectexplorer/buildmanager.h>
|
||||
#include <projectexplorer/buildsystem.h>
|
||||
#include <projectexplorer/project.h>
|
||||
#include <projectexplorer/projectexplorer.h>
|
||||
#include <projectexplorer/projectexplorersettings.h>
|
||||
#include <projectexplorer/projectmanager.h>
|
||||
#include <projectexplorer/runconfiguration.h>
|
||||
@@ -169,11 +168,9 @@ void TestRunner::runTests(TestRunMode mode, const QList<ITestConfiguration *> &s
|
||||
|
||||
m_skipTargetsCheck = false;
|
||||
m_runMode = mode;
|
||||
const ProjectExplorerSettings projectExplorerSettings
|
||||
= ProjectExplorerPlugin::projectExplorerSettings();
|
||||
if (mode != TestRunMode::RunAfterBuild
|
||||
&& projectExplorerSettings.buildBeforeDeploy != BuildBeforeRunMode::Off
|
||||
&& !projectExplorerSettings.saveBeforeBuild) {
|
||||
&& projectExplorerSettings().buildBeforeDeploy != BuildBeforeRunMode::Off
|
||||
&& !projectExplorerSettings().saveBeforeBuild) {
|
||||
if (!ProjectExplorerPlugin::saveModifiedFiles())
|
||||
return;
|
||||
}
|
||||
@@ -203,7 +200,7 @@ void TestRunner::runTests(TestRunMode mode, const QList<ITestConfiguration *> &s
|
||||
m_targetConnect = connect(project, &Project::activeTargetChanged,
|
||||
this, [this] { cancelCurrent(KitChanged); });
|
||||
|
||||
if (projectExplorerSettings.buildBeforeDeploy == BuildBeforeRunMode::Off
|
||||
if (projectExplorerSettings().buildBeforeDeploy == BuildBeforeRunMode::Off
|
||||
|| mode == TestRunMode::DebugWithoutDeploy
|
||||
|| mode == TestRunMode::RunWithoutDeploy || mode == TestRunMode::RunAfterBuild) {
|
||||
runOrDebugTests();
|
||||
|
||||
Reference in New Issue
Block a user