From fc7634d7307939aeb79008a0a0d689c3dccfa1b6 Mon Sep 17 00:00:00 2001 From: hjk Date: Wed, 25 May 2022 09:11:51 +0200 Subject: [PATCH] Debugger: Remove DebuggerRunTool::setInferiorDevice() Handled by the device implicit in FilePath nowadays. Change-Id: I45b0e1b03de486df678e239143e2bdd995bee380 Reviewed-by: Jarek Kobus Reviewed-by: David Schulz Reviewed-by: Qt CI Bot Reviewed-by: Christian Stenger --- src/plugins/debugger/debuggerplugin.cpp | 3 +-- src/plugins/debugger/debuggerruncontrol.cpp | 5 ----- src/plugins/debugger/debuggerruncontrol.h | 1 - src/plugins/valgrind/memchecktool.cpp | 1 - 4 files changed, 1 insertion(+), 9 deletions(-) diff --git a/src/plugins/debugger/debuggerplugin.cpp b/src/plugins/debugger/debuggerplugin.cpp index 8d8c013c206..3accce69ebb 100644 --- a/src/plugins/debugger/debuggerplugin.cpp +++ b/src/plugins/debugger/debuggerplugin.cpp @@ -1736,8 +1736,7 @@ RunControl *DebuggerPluginPrivate::attachToRunningProcess(Kit *kit, runControl->setDisplayName(tr("Process %1").arg(processInfo.processId)); auto debugger = new DebuggerRunTool(runControl); debugger->setAttachPid(ProcessHandle(processInfo.processId)); - debugger->setInferiorExecutable(FilePath::fromString(processInfo.executable)); - debugger->setInferiorDevice(device); + debugger->setInferiorExecutable(device->filePath(processInfo.executable)); debugger->setStartMode(AttachToLocalProcess); debugger->setCloseMode(DetachAtClose); debugger->setContinueAfterAttach(contAfterAttach); diff --git a/src/plugins/debugger/debuggerruncontrol.cpp b/src/plugins/debugger/debuggerruncontrol.cpp index 832f024c85a..25a6d1acc57 100644 --- a/src/plugins/debugger/debuggerruncontrol.cpp +++ b/src/plugins/debugger/debuggerruncontrol.cpp @@ -395,11 +395,6 @@ void DebuggerRunTool::setInferiorEnvironment(const Utils::Environment &env) m_runParameters.inferior.environment = env; } -void DebuggerRunTool::setInferiorDevice(IDevice::ConstPtr device) -{ - m_runParameters.inferior.device = device; -} - void DebuggerRunTool::setRunControlName(const QString &name) { m_runParameters.displayName = name; diff --git a/src/plugins/debugger/debuggerruncontrol.h b/src/plugins/debugger/debuggerruncontrol.h index a0664a267da..4781a059366 100644 --- a/src/plugins/debugger/debuggerruncontrol.h +++ b/src/plugins/debugger/debuggerruncontrol.h @@ -76,7 +76,6 @@ public: void setInferior(const ProjectExplorer::Runnable &runnable); void setInferiorExecutable(const Utils::FilePath &executable); void setInferiorEnvironment(const Utils::Environment &env); // Used by GammaRay plugin - void setInferiorDevice(ProjectExplorer::IDeviceConstPtr device); // Used by cdbengine void setRunControlName(const QString &name); void setStartMessage(const QString &msg); void addQmlServerInferiorCommandLineArgumentIfNeeded(); diff --git a/src/plugins/valgrind/memchecktool.cpp b/src/plugins/valgrind/memchecktool.cpp index 99cbf51d72e..e232726e04c 100644 --- a/src/plugins/valgrind/memchecktool.cpp +++ b/src/plugins/valgrind/memchecktool.cpp @@ -1672,7 +1672,6 @@ void HeobData::processFinished() auto debugger = new DebuggerRunTool(m_runControl); debugger->setAttachPid(ProcessHandle(m_data[1])); debugger->setRunControlName(tr("Process %1").arg(m_data[1])); - debugger->setInferiorDevice(DeviceKitAspect::device(m_kit)); debugger->setStartMode(AttachToLocalProcess); debugger->setCloseMode(DetachAtClose); debugger->setContinueAfterAttach(true);