Valgrind: Replace one use of Runnable::device

Change-Id: I8b4ae375ec2835b8d04d08eab528cac9755ee811
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
This commit is contained in:
hjk
2022-05-25 13:46:23 +02:00
parent fc7634d730
commit b47b95394b

View File

@@ -28,7 +28,6 @@
#include "memcheckerrorview.h" #include "memcheckerrorview.h"
#include "valgrindsettings.h" #include "valgrindsettings.h"
#include "valgrindplugin.h"
#include "valgrindengine.h" #include "valgrindengine.h"
#include "valgrindsettings.h" #include "valgrindsettings.h"
#include "valgrindrunner.h" #include "valgrindrunner.h"
@@ -38,9 +37,6 @@
#include "xmlprotocol/errorlistmodel.h" #include "xmlprotocol/errorlistmodel.h"
#include "xmlprotocol/frame.h" #include "xmlprotocol/frame.h"
#include "xmlprotocol/stack.h" #include "xmlprotocol/stack.h"
#include "xmlprotocol/stackmodel.h"
#include "xmlprotocol/status.h"
#include "xmlprotocol/suppression.h"
#include "xmlprotocol/threadedparser.h" #include "xmlprotocol/threadedparser.h"
#include <debugger/debuggerkitinformation.h> #include <debugger/debuggerkitinformation.h>
@@ -51,7 +47,7 @@
#include <projectexplorer/buildconfiguration.h> #include <projectexplorer/buildconfiguration.h>
#include <projectexplorer/deploymentdata.h> #include <projectexplorer/deploymentdata.h>
#include <projectexplorer/devicesupport/idevice.h> #include <projectexplorer/devicesupport/devicemanager.h>
#include <projectexplorer/kitinformation.h> #include <projectexplorer/kitinformation.h>
#include <projectexplorer/project.h> #include <projectexplorer/project.h>
#include <projectexplorer/projectexplorer.h> #include <projectexplorer/projectexplorer.h>
@@ -746,10 +742,9 @@ void MemcheckToolPrivate::heobAction()
kit = target->kit(); kit = target->kit();
if (kit) { if (kit) {
abi = ToolChainKitAspect::targetAbi(kit); abi = ToolChainKitAspect::targetAbi(kit);
sr = rc->runnable();
const Runnable runnable = rc->runnable(); const IDevice::ConstPtr device
sr = runnable; = DeviceManager::deviceForPath(sr.command.executable());
const IDevice::ConstPtr device = sr.device;
hasLocalRc = device && device->type() == ProjectExplorer::Constants::DESKTOP_DEVICE_TYPE; hasLocalRc = device && device->type() == ProjectExplorer::Constants::DESKTOP_DEVICE_TYPE;
if (!hasLocalRc) if (!hasLocalRc)
hasLocalRc = DeviceTypeKitAspect::deviceTypeId(kit) == ProjectExplorer::Constants::DESKTOP_DEVICE_TYPE; hasLocalRc = DeviceTypeKitAspect::deviceTypeId(kit) == ProjectExplorer::Constants::DESKTOP_DEVICE_TYPE;