From 23e46b2f067a7ab94d236d64247396a9bfc821ae Mon Sep 17 00:00:00 2001 From: hjk Date: Thu, 24 Aug 2017 17:13:02 +0200 Subject: [PATCH] WinRT: Use new setter based DebuggerRunTool interface Change-Id: Icda75b686eeda23c4babd4dbbf32f04d01e2d255 Reviewed-by: Oliver Wolff --- src/plugins/winrt/winrtdebugsupport.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/plugins/winrt/winrtdebugsupport.cpp b/src/plugins/winrt/winrtdebugsupport.cpp index dd45abb7fea..de74efdc519 100644 --- a/src/plugins/winrt/winrtdebugsupport.cpp +++ b/src/plugins/winrt/winrtdebugsupport.cpp @@ -49,10 +49,9 @@ WinRtDebugSupport::WinRtDebugSupport(RunControl *runControl) : DebuggerRunTool(runControl) { // FIXME: This is just working for local debugging; - DebuggerStartParameters params; - params.startMode = AttachExternal; + setStartMode(AttachExternal); // The first Thread needs to be resumed manually. - params.commandsAfterConnect = "~0 m"; + setCommandsAfterConnect("~0 m"); QFileInfo debuggerHelper(QCoreApplication::applicationDirPath() + QLatin1String("/winrtdebughelper.exe")); @@ -64,11 +63,12 @@ WinRtDebugSupport::WinRtDebugSupport(RunControl *runControl) } if (isQmlDebugging()) { - params.qmlServer = ProjectExplorer::urlFromLocalHostAndFreePort(); - if (params.qmlServer.port() <= 0) { + QUrl qmlServer = ProjectExplorer::urlFromLocalHostAndFreePort(); + if (qmlServer.port() <= 0) { reportFailure(tr("Not enough free ports for QML debugging.")); return; } + setQmlServer(qmlServer); } QString errorMessage; @@ -99,14 +99,14 @@ WinRtDebugSupport::WinRtDebugSupport(RunControl *runControl) QList arg = output.split(':'); if (arg.first() == "PID") { bool ok =false; - params.attachPID = Utils::ProcessHandle(arg.last().toInt(&ok)); + int pid = arg.last().toInt(&ok); if (!ok) { reportFailure(tr("Cannot extract the PID from the WinRT debugging helper. " "(output: %1)").arg(QString::fromLocal8Bit(output))); return; } + setAttachPid(Utils::ProcessHandle(pid)); server.close(); - setStartParameters(params); return; } }