Boot2Qt: Fix crash when manually rebooting

Fixes: QTCREATORBUG-27879
Change-Id: Id88c8246418217dd7fd75cc0fc436cb9e714d744
Reviewed-by: Mikko Gronoff <mikko.gronoff@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
hjk
2022-07-22 11:57:44 +02:00
parent 63200ff771
commit f507597651

View File

@@ -129,12 +129,12 @@ QdbDevice::QdbDevice()
{
setDisplayType(tr("Boot2Qt Device"));
addDeviceAction({tr("Reboot Device"), [this](const IDevice::Ptr &device, QWidget *) {
(void) new DeviceApplicationObserver(device, {filePath("reboot"), {}});
addDeviceAction({tr("Reboot Device"), [](const IDevice::Ptr &device, QWidget *) {
(void) new DeviceApplicationObserver(device, {device->filePath("reboot"), {}});
}});
addDeviceAction({tr("Restore Default App"), [this](const IDevice::Ptr &device, QWidget *) {
(void) new DeviceApplicationObserver(device, {filePath("appcontroller"), {"--remove-default"}});
addDeviceAction({tr("Restore Default App"), [](const IDevice::Ptr &device, QWidget *) {
(void) new DeviceApplicationObserver(device, {device->filePath("appcontroller"), {"--remove-default"}});
}});
}