aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorhjk <hjk@qt.io>2022-12-01 08:37:11 +0100
committerhjk <hjk@qt.io>2022-12-02 10:15:46 +0000
commit03525e7d3c4dd36d6ff6f5c60e57d8f69e7af543 (patch)
tree18692b11a71379addc2f343733db174782c46894
parent6c676636ba0179a41a96142937a4d7c9f9aa752a (diff)
Boot2Qt: Feed remote-qualified executable into ExecutableAspect
Change-Id: I8a6d21147ef0df7a1e56fc2c125f687f05fef923 Reviewed-by: Ari Parkkila <ari.parkkila@qt.io> Reviewed-by: Christian Stenger <christian.stenger@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
-rw-r--r--src/plugins/boot2qt/qdbplugin.cpp9
-rw-r--r--src/plugins/boot2qt/qdbrunconfiguration.cpp8
2 files changed, 11 insertions, 6 deletions
diff --git a/src/plugins/boot2qt/qdbplugin.cpp b/src/plugins/boot2qt/qdbplugin.cpp
index a1157cca01..77dca67bd3 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 7f203fd47e..28097f7f5f 100644
--- a/src/plugins/boot2qt/qdbrunconfiguration.cpp
+++ b/src/plugins/boot2qt/qdbrunconfiguration.cpp
@@ -8,6 +8,8 @@
#include <projectexplorer/buildsystem.h>
#include <projectexplorer/buildtargetinfo.h>
#include <projectexplorer/deploymentdata.h>
+#include <projectexplorer/devicesupport/idevice.h>
+#include <projectexplorer/kitinformation.h>
#include <projectexplorer/project.h>
#include <projectexplorer/runconfigurationaspects.h>
#include <projectexplorer/target.h>
@@ -15,6 +17,7 @@
#include <remotelinux/remotelinuxenvironmentaspect.h>
#include <utils/commandline.h>
+#include <utils/qtcassert.h>
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);
});