From b47b95394b16690cc0cd9113d690dcfd730c86b2 Mon Sep 17 00:00:00 2001 From: hjk Date: Wed, 25 May 2022 13:46:23 +0200 Subject: [PATCH] Valgrind: Replace one use of Runnable::device Change-Id: I8b4ae375ec2835b8d04d08eab528cac9755ee811 Reviewed-by: Jarek Kobus Reviewed-by: --- src/plugins/valgrind/memchecktool.cpp | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/src/plugins/valgrind/memchecktool.cpp b/src/plugins/valgrind/memchecktool.cpp index e232726e04c..183daa80256 100644 --- a/src/plugins/valgrind/memchecktool.cpp +++ b/src/plugins/valgrind/memchecktool.cpp @@ -28,7 +28,6 @@ #include "memcheckerrorview.h" #include "valgrindsettings.h" -#include "valgrindplugin.h" #include "valgrindengine.h" #include "valgrindsettings.h" #include "valgrindrunner.h" @@ -38,9 +37,6 @@ #include "xmlprotocol/errorlistmodel.h" #include "xmlprotocol/frame.h" #include "xmlprotocol/stack.h" -#include "xmlprotocol/stackmodel.h" -#include "xmlprotocol/status.h" -#include "xmlprotocol/suppression.h" #include "xmlprotocol/threadedparser.h" #include @@ -51,7 +47,7 @@ #include #include -#include +#include #include #include #include @@ -746,10 +742,9 @@ void MemcheckToolPrivate::heobAction() kit = target->kit(); if (kit) { abi = ToolChainKitAspect::targetAbi(kit); - - const Runnable runnable = rc->runnable(); - sr = runnable; - const IDevice::ConstPtr device = sr.device; + sr = rc->runnable(); + const IDevice::ConstPtr device + = DeviceManager::deviceForPath(sr.command.executable()); hasLocalRc = device && device->type() == ProjectExplorer::Constants::DESKTOP_DEVICE_TYPE; if (!hasLocalRc) hasLocalRc = DeviceTypeKitAspect::deviceTypeId(kit) == ProjectExplorer::Constants::DESKTOP_DEVICE_TYPE;