From e2df7b7f6b1531a6b08455b068d364b7e3b74405 Mon Sep 17 00:00:00 2001 From: hjk Date: Tue, 10 May 2022 15:41:57 +0200 Subject: [PATCH] Qdb: Avoid some direct IDevice::mapToGlobalPath use Change-Id: I701ccaa0e563f9cc040625ac34d0b4d8b7229c5b Reviewed-by: Jarek Kobus Reviewed-by: --- src/plugins/boot2qt/qdbdevice.cpp | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/src/plugins/boot2qt/qdbdevice.cpp b/src/plugins/boot2qt/qdbdevice.cpp index 7ef6e130acb..bca58838f54 100644 --- a/src/plugins/boot2qt/qdbdevice.cpp +++ b/src/plugins/boot2qt/qdbdevice.cpp @@ -80,9 +80,7 @@ public: QTC_ASSERT(device, return); m_deviceName = device->displayName(); - CommandLine cmd; - cmd.setExecutable(device->mapToGlobalPath(command.executable())); - m_appRunner.setCommand(cmd); + m_appRunner.setCommand(command); m_appRunner.start(); showMessage(QdbDevice::tr("Starting command \"%1\" on device \"%2\".") .arg(command.toUserOutput(), m_deviceName)); @@ -132,12 +130,12 @@ QdbDevice::QdbDevice() { setDisplayType(tr("Boot2Qt Device")); - addDeviceAction({tr("Reboot Device"), [](const IDevice::Ptr &device, QWidget *) { - (void) new DeviceApplicationObserver(device, CommandLine{"reboot"}); + addDeviceAction({tr("Reboot Device"), [this](const IDevice::Ptr &device, QWidget *) { + (void) new DeviceApplicationObserver(device, {filePath("reboot"), {}}); }}); - addDeviceAction({tr("Restore Default App"), [](const IDevice::Ptr &device, QWidget *) { - (void) new DeviceApplicationObserver(device, CommandLine{"appcontroller", {"--remove-default"}}); + addDeviceAction({tr("Restore Default App"), [this](const IDevice::Ptr &device, QWidget *) { + (void) new DeviceApplicationObserver(device, {filePath("appcontroller"), {"--remove-default"}}); }}); }