forked from qt-creator/qt-creator
WinRT: Use new setter based DebuggerRunTool interface
Change-Id: Icda75b686eeda23c4babd4dbbf32f04d01e2d255 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user