Commit 23e46b2f authored by hjk's avatar hjk

WinRT: Use new setter based DebuggerRunTool interface

Change-Id: Icda75b686eeda23c4babd4dbbf32f04d01e2d255
Reviewed-by: Oliver Wolff's avatarOliver Wolff <oliver.wolff@qt.io>
parent 82ce3c88
......@@ -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<QByteArray> 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;
}
}
......
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