From 9190c79203a988391d59c0857871b07afcf8c5b0 Mon Sep 17 00:00:00 2001 From: Nicolas Fella Date: Thu, 28 Feb 2019 14:24:25 +0100 Subject: [PATCH] Avoid detach --- runners/findmyphone/findmyphonerunner.cpp | 3 ++- runners/remotecommands/remotecommandsrunner.cpp | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/runners/findmyphone/findmyphonerunner.cpp b/runners/findmyphone/findmyphonerunner.cpp index 9fbc913c8..0ff4eda56 100644 --- a/runners/findmyphone/findmyphonerunner.cpp +++ b/runners/findmyphone/findmyphonerunner.cpp @@ -47,7 +47,8 @@ void FindMyPhoneRunner::match(Plasma::RunnerContext &context) if (devicesReply.isValid()) { - for (const QString& deviceId : devicesReply.value()) { + const auto devices = devicesReply.value(); + for (const QString& deviceId : devices) { DeviceDbusInterface deviceInterface(deviceId, this); diff --git a/runners/remotecommands/remotecommandsrunner.cpp b/runners/remotecommands/remotecommandsrunner.cpp index 22d8f90a1..e6f448539 100644 --- a/runners/remotecommands/remotecommandsrunner.cpp +++ b/runners/remotecommands/remotecommandsrunner.cpp @@ -46,7 +46,8 @@ void RemoteCommandsRunner::match(Plasma::RunnerContext &context) if (devicesReply.isValid()) { - for (const QString& deviceId : devicesReply.value()) { + const auto devices = devicesReply.value(); + for (const QString& deviceId : devices) { DeviceDbusInterface deviceInterface(deviceId, this);