From 03525e7d3c4dd36d6ff6f5c60e57d8f69e7af543 Mon Sep 17 00:00:00 2001 From: hjk Date: Thu, 1 Dec 2022 08:37:11 +0100 Subject: [PATCH] Boot2Qt: Feed remote-qualified executable into ExecutableAspect Change-Id: I8a6d21147ef0df7a1e56fc2c125f687f05fef923 Reviewed-by: Ari Parkkila Reviewed-by: Christian Stenger Reviewed-by: Qt CI Bot --- src/plugins/boot2qt/qdbplugin.cpp | 9 +++++---- src/plugins/boot2qt/qdbrunconfiguration.cpp | 8 ++++++-- 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/src/plugins/boot2qt/qdbplugin.cpp b/src/plugins/boot2qt/qdbplugin.cpp index a1157cca01a..77dca67bd32 100644 --- a/src/plugins/boot2qt/qdbplugin.cpp +++ b/src/plugins/boot2qt/qdbplugin.cpp @@ -121,10 +121,11 @@ public: : SimpleTargetRunner(runControl) { setStartModifier([this] { - CommandLine plain = commandLine(); - CommandLine cmd; - cmd.setExecutable(plain.executable().withNewPath(Constants::AppcontrollerFilepath)); - cmd.addCommandLineAsArgs(plain); + const CommandLine remoteCommand = commandLine(); + const FilePath remoteExe = remoteCommand.executable(); + CommandLine cmd{remoteExe.withNewPath(Constants::AppcontrollerFilepath)}; + cmd.addArg(remoteExe.nativePath()); + cmd.addArgs(remoteCommand.arguments(), CommandLine::Raw); setCommandLine(cmd); }); } diff --git a/src/plugins/boot2qt/qdbrunconfiguration.cpp b/src/plugins/boot2qt/qdbrunconfiguration.cpp index 7f203fd47e1..28097f7f5f0 100644 --- a/src/plugins/boot2qt/qdbrunconfiguration.cpp +++ b/src/plugins/boot2qt/qdbrunconfiguration.cpp @@ -8,6 +8,8 @@ #include #include #include +#include +#include #include #include #include @@ -15,6 +17,7 @@ #include #include +#include using namespace ProjectExplorer; using namespace Utils; @@ -90,8 +93,9 @@ QdbRunConfiguration::QdbRunConfiguration(Target *target, Id id) const BuildTargetInfo bti = buildTargetInfo(); const FilePath localExecutable = bti.targetFilePath; const DeployableFile depFile = target->deploymentData().deployableForLocalFile(localExecutable); - - exeAspect->setExecutable(FilePath::fromString(depFile.remoteFilePath())); + IDevice::ConstPtr dev = DeviceKitAspect::device(target->kit()); + QTC_ASSERT(dev, return); + exeAspect->setExecutable(dev->filePath(depFile.remoteFilePath())); symbolsAspect->setFilePath(localExecutable); });