forked from qt-creator/qt-creator
Qdb: Avoid some direct IDevice::mapToGlobalPath use
Change-Id: I701ccaa0e563f9cc040625ac34d0b4d8b7229c5b Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io> Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
This commit is contained in:
@@ -80,9 +80,7 @@ public:
|
|||||||
QTC_ASSERT(device, return);
|
QTC_ASSERT(device, return);
|
||||||
m_deviceName = device->displayName();
|
m_deviceName = device->displayName();
|
||||||
|
|
||||||
CommandLine cmd;
|
m_appRunner.setCommand(command);
|
||||||
cmd.setExecutable(device->mapToGlobalPath(command.executable()));
|
|
||||||
m_appRunner.setCommand(cmd);
|
|
||||||
m_appRunner.start();
|
m_appRunner.start();
|
||||||
showMessage(QdbDevice::tr("Starting command \"%1\" on device \"%2\".")
|
showMessage(QdbDevice::tr("Starting command \"%1\" on device \"%2\".")
|
||||||
.arg(command.toUserOutput(), m_deviceName));
|
.arg(command.toUserOutput(), m_deviceName));
|
||||||
@@ -132,12 +130,12 @@ QdbDevice::QdbDevice()
|
|||||||
{
|
{
|
||||||
setDisplayType(tr("Boot2Qt Device"));
|
setDisplayType(tr("Boot2Qt Device"));
|
||||||
|
|
||||||
addDeviceAction({tr("Reboot Device"), [](const IDevice::Ptr &device, QWidget *) {
|
addDeviceAction({tr("Reboot Device"), [this](const IDevice::Ptr &device, QWidget *) {
|
||||||
(void) new DeviceApplicationObserver(device, CommandLine{"reboot"});
|
(void) new DeviceApplicationObserver(device, {filePath("reboot"), {}});
|
||||||
}});
|
}});
|
||||||
|
|
||||||
addDeviceAction({tr("Restore Default App"), [](const IDevice::Ptr &device, QWidget *) {
|
addDeviceAction({tr("Restore Default App"), [this](const IDevice::Ptr &device, QWidget *) {
|
||||||
(void) new DeviceApplicationObserver(device, CommandLine{"appcontroller", {"--remove-default"}});
|
(void) new DeviceApplicationObserver(device, {filePath("appcontroller"), {"--remove-default"}});
|
||||||
}});
|
}});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user