summaryrefslogtreecommitdiff
path: root/src/plugins/projectexplorer/runconfiguration.cpp
diff options
context:
space:
mode:
authorhjk <hjk@qt.io>2022-05-10 16:30:26 +0200
committerhjk <hjk@qt.io>2022-05-16 10:57:43 +0000
commit0d733e68b55db6e5a690e6a7bb8e0afece999c9a (patch)
treed8e021d6aaa92fc0670a86ec76bef4b30f3e0afb /src/plugins/projectexplorer/runconfiguration.cpp
parentef2c551121f3cd61e5cef84f9d3a67a7c5ab124b (diff)
downloadqt-creator-0d733e68b55db6e5a690e6a7bb8e0afece999c9a.tar.gz
ProjectExplorer: Create Runnables with full device paths in RunConfig
... instead of fixing them later in the ApplicationLauncher as used by all SimpleTargetRunners. The mapping to device paths happens now in the default commandline getter on paths from the ExecutableAspect. This is (only) wrong in the case of (local) custom runconfig with a device present, so this needs a custom commmandline getter not doing the transformation. Change-Id: I525bc0ea59b5e7caf7a445a1a723d6f5b152162d Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io> Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Diffstat (limited to 'src/plugins/projectexplorer/runconfiguration.cpp')
-rw-r--r--src/plugins/projectexplorer/runconfiguration.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/plugins/projectexplorer/runconfiguration.cpp b/src/plugins/projectexplorer/runconfiguration.cpp
index 542bae5801..09bd39ebba 100644
--- a/src/plugins/projectexplorer/runconfiguration.cpp
+++ b/src/plugins/projectexplorer/runconfiguration.cpp
@@ -209,13 +209,17 @@ RunConfiguration::RunConfiguration(Target *target, Utils::Id id)
[this] { return commandLine().executable(); });
- m_commandLineGetter = [this] {
+ m_commandLineGetter = [target, this] {
FilePath executable;
if (const auto executableAspect = aspect<ExecutableAspect>())
executable = executableAspect->executable();
QString arguments;
if (const auto argumentsAspect = aspect<ArgumentsAspect>())
arguments = argumentsAspect->arguments(macroExpander());
+
+ if (IDevice::ConstPtr dev = DeviceKitAspect::device(target->kit()))
+ executable = dev->filePath(executable.path());
+
return CommandLine{executable, arguments, CommandLine::Raw};
};