From 06624422c244fb050522ad6ff3f546324428f117 Mon Sep 17 00:00:00 2001 From: hjk Date: Tue, 24 May 2022 10:00:53 +0200 Subject: [PATCH] Debugger: Avoid another use of Runnable::device Change-Id: If89aafd4d81efb2e0d7ec3dfcaf6a204a4b17159 Reviewed-by: Jarek Kobus Reviewed-by: --- src/plugins/debugger/analyzer/startremotedialog.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/plugins/debugger/analyzer/startremotedialog.cpp b/src/plugins/debugger/analyzer/startremotedialog.cpp index 9ef484f9f97..e148c0f5bff 100644 --- a/src/plugins/debugger/analyzer/startremotedialog.cpp +++ b/src/plugins/debugger/analyzer/startremotedialog.cpp @@ -132,9 +132,13 @@ void StartRemoteDialog::validate() Runnable StartRemoteDialog::runnable() const { Kit *kit = d->kitChooser->currentKit(); + IDevice::ConstPtr device = DeviceKitAspect::device(kit); + FilePath filePath = FilePath::fromString(d->executable->text()); + if (device) + filePath = device->filePath(d->arguments->text()); + Runnable r; - r.device = DeviceKitAspect::device(kit); - r.command = {FilePath::fromString(d->executable->text()), d->arguments->text(), CommandLine::Raw}; + r.command = {filePath, d->arguments->text(), CommandLine::Raw}; r.workingDirectory = FilePath::fromString(d->workingDirectory->text()); return r; }