Commit 406ddaa3 authored by hjk's avatar hjk

Debugger: Remove DebuggerRunParameters::device member

The device is always available via runTool().

Change-Id: I4a2a791a5a75b32803c06fc34947b82b869fe31c
Reviewed-by: Christian Stenger's avatarChristian Stenger <christian.stenger@qt.io>
parent 461ffae8
......@@ -35,7 +35,7 @@
#include <debugger/debuggerinternalconstants.h>
#include <debugger/debuggerprotocol.h>
#include <debugger/debuggermainwindow.h>
#include <debugger/debuggerstartparameters.h>
#include <debugger/debuggerruncontrol.h>
#include <debugger/debuggertooltipmanager.h>
#include <debugger/disassembleragent.h>
#include <debugger/disassemblerlines.h>
......@@ -978,7 +978,7 @@ void CdbEngine::doInterruptInferior(SpecialStopMode sm)
showMessage(QString("Interrupting process %1...").arg(inferiorPid()), LogMisc);
QTC_ASSERT(!m_signalOperation, notifyInferiorStopFailed(); return;);
m_signalOperation = runParameters().device->signalOperation();
m_signalOperation = runTool()->device()->signalOperation();
m_specialStopMode = sm;
QTC_ASSERT(m_signalOperation, notifyInferiorStopFailed(); return;);
connect(m_signalOperation.data(), &DeviceProcessSignalOperation::finished,
......
......@@ -101,7 +101,6 @@ public:
QString debugInfoLocation; // Gdb "set-debug-file-directory".
QStringList debugSourceLocation; // Gdb "directory"
QString serverStartScript;
ProjectExplorer::IDevice::ConstPtr device;
bool isSnapshot = false; // Set if created internally.
ProjectExplorer::Abi toolChainAbi;
......
......@@ -352,7 +352,6 @@ static bool fixupParameters(DebuggerRunParameters &rp, RunControl *runControl, Q
rp.cppEngineType = DebuggerKitInformation::engineType(kit);
if (rp.sysRoot.isEmpty())
rp.sysRoot = SysRootKitInformation::sysRoot(kit).toString();
rp.device = DeviceKitInformation::device(kit);
if (rp.displayName.isEmpty() && runConfig)
rp.displayName = runConfig->displayName();
......@@ -406,8 +405,9 @@ static bool fixupParameters(DebuggerRunParameters &rp, RunControl *runControl, Q
}
}
IDevice::ConstPtr device = runControl->device();
if (rp.languages & QmlLanguage) {
if (rp.device && rp.device->type() == ProjectExplorer::Constants::DESKTOP_DEVICE_TYPE) {
if (device && device->type() == ProjectExplorer::Constants::DESKTOP_DEVICE_TYPE) {
if (rp.qmlServer.host.isEmpty() || !rp.qmlServer.port.isValid()) {
QTcpServer server;
const bool canListen = server.listen(QHostAddress::LocalHost)
......@@ -468,8 +468,8 @@ static bool fixupParameters(DebuggerRunParameters &rp, RunControl *runControl, Q
if (rp.masterEngineType == NoEngineType)
rp.masterEngineType = rp.cppEngineType;
if (rp.device && rp.connParams.port == 0)
rp.connParams = rp.device->sshParameters();
if (device && rp.connParams.port == 0)
rp.connParams = device->sshParameters();
// Could have been set from command line.
if (rp.remoteChannel.isEmpty())
......
......@@ -829,7 +829,7 @@ void GdbEngine::interruptInferior()
if (HostOsInfo::isWindowsHost() && !m_isQnxGdb) {
QTC_ASSERT(state() == InferiorStopRequested, qDebug() << state(); notifyInferiorStopFailed());
QTC_ASSERT(!m_signalOperation, notifyInferiorStopFailed());
m_signalOperation = runParameters().device->signalOperation();
m_signalOperation = runTool()->device()->signalOperation();
QTC_ASSERT(m_signalOperation, notifyInferiorStopFailed());
connect(m_signalOperation.data(), &DeviceProcessSignalOperation::finished,
this, &GdbEngine::handleInterruptDeviceInferior);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment