Debugger: Avoid another use of Runnable::device

Change-Id: If89aafd4d81efb2e0d7ec3dfcaf6a204a4b17159
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
This commit is contained in:
hjk
2022-05-24 10:00:53 +02:00
parent 3330337a03
commit 06624422c2

View File

@@ -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;
}