aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorhjk <hjk@qt.io>2019-08-07 12:16:48 +0200
committerhjk <hjk@qt.io>2019-08-07 11:51:04 +0000
commita79957038ad7d761e12a05446e2f9505569d7285 (patch)
tree70e92eb25831f2b0a5ba5a9ca778d6f6029fa442
parentebc2b9ed6fe2613cbde6099368b05587db6b9c49 (diff)
ProjectExplorer: Replace RunControl::buildTargetInfo
... by two accessors to the only used field. General idea here is to make the presence of a RunConfiguration in a RunControl less prominent to be able to remove it at some time completely, as the configuration's data might change while the control is running. Change-Id: I752540fadd135d6904fc9bf4e3506be074b0c003 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
-rw-r--r--src/plugins/projectexplorer/runcontrol.cpp9
-rw-r--r--src/plugins/projectexplorer/runcontrol.h5
-rw-r--r--src/plugins/winrt/winrtdebugsupport.cpp2
-rw-r--r--src/plugins/winrt/winrtrunnerhelper.cpp7
4 files changed, 14 insertions, 9 deletions
diff --git a/src/plugins/projectexplorer/runcontrol.cpp b/src/plugins/projectexplorer/runcontrol.cpp
index 5c1cec77e44..7ee2dc23293 100644
--- a/src/plugins/projectexplorer/runcontrol.cpp
+++ b/src/plugins/projectexplorer/runcontrol.cpp
@@ -891,9 +891,14 @@ QString RunControl::buildKey() const
return d->runConfiguration ? d->runConfiguration->buildKey() : QString();
}
-BuildTargetInfo RunControl::buildTargetInfo() const
+FilePath RunControl::targetFilePath() const
{
- return d->runConfiguration->buildTargetInfo();
+ return d->runConfiguration->buildTargetInfo().targetFilePath;
+}
+
+FilePath RunControl::projectFilePath() const
+{
+ return d->runConfiguration->buildTargetInfo().projectFilePath;
}
/*!
diff --git a/src/plugins/projectexplorer/runcontrol.h b/src/plugins/projectexplorer/runcontrol.h
index ce788669683..2c2defadb42 100644
--- a/src/plugins/projectexplorer/runcontrol.h
+++ b/src/plugins/projectexplorer/runcontrol.h
@@ -26,7 +26,6 @@
#pragma once
#include "applicationlauncher.h"
-#include "buildtargetinfo.h"
#include "devicesupport/idevice.h"
#include "projectexplorerconstants.h"
#include "runconfiguration.h"
@@ -245,7 +244,9 @@ public:
ISettingsAspect *settings(Core::Id id) const;
QString buildKey() const;
- BuildTargetInfo buildTargetInfo() const;
+
+ Utils::FilePath targetFilePath() const;
+ Utils::FilePath projectFilePath() const;
Utils::OutputFormatter *outputFormatter() const;
Core::Id runMode() const;
diff --git a/src/plugins/winrt/winrtdebugsupport.cpp b/src/plugins/winrt/winrtdebugsupport.cpp
index 5c91ee258a0..d409b0cdb0c 100644
--- a/src/plugins/winrt/winrtdebugsupport.cpp
+++ b/src/plugins/winrt/winrtdebugsupport.cpp
@@ -75,7 +75,7 @@ WinRtDebugSupport::WinRtDebugSupport(RunControl *runControl)
setQmlServer(qmlServer);
}
- setSymbolFile(runControl->buildTargetInfo().targetFilePath);
+ setSymbolFile(runControl->targetFilePath());
QString errorMessage;
m_runner = new WinRtRunnerHelper(this, &errorMessage);
if (!errorMessage.isEmpty()) {
diff --git a/src/plugins/winrt/winrtrunnerhelper.cpp b/src/plugins/winrt/winrtrunnerhelper.cpp
index 3e29aeb9df1..69d718e5757 100644
--- a/src/plugins/winrt/winrtrunnerhelper.cpp
+++ b/src/plugins/winrt/winrtrunnerhelper.cpp
@@ -69,12 +69,11 @@ WinRtRunnerHelper::WinRtRunnerHelper(ProjectExplorer::RunWorker *runWorker, QStr
return;
}
- const BuildTargetInfo bti = runControl->buildTargetInfo();
- m_executableFilePath = bti.targetFilePath.toString();
+ m_executableFilePath = runControl->targetFilePath().toString();
if (m_executableFilePath.isEmpty()) {
- *errorMessage = tr("Cannot determine the executable file path for \"%1\".").arg(
- QDir::toNativeSeparators(bti.projectFilePath.toString()));
+ *errorMessage = tr("Cannot determine the executable file path for \"%1\".")
+ .arg(runControl->projectFilePath().toUserOutput());
return;
}