Debugger: Fix QML-only debugging on Harmattan

Actually wait for the 'Waiting for debugger on port ' ... message
to appear in the application output before connecting, and also
use the port specified there.

Change-Id: Ib498e5306bc49f2f3d468353b1c5d1ea38a809e6
Reviewed-by: Christian Kandeler <christian.kandeler@nokia.com>
This commit is contained in:
Kai Koehne
2012-02-21 15:47:55 +01:00
parent 08786b09a0
commit 742019e301
10 changed files with 82 additions and 27 deletions

View File

@@ -149,7 +149,9 @@ QmlProfilerEngine::QmlProfilerEngine(IAnalyzerTool *tool,
connect(&d->m_noDebugOutputTimer, SIGNAL(timeout()), this, SLOT(processIsRunning()));
d->m_outputParser.setNoOutputText(ApplicationLauncher::msgWinCannotRetrieveDebuggingOutput());
connect(&d->m_outputParser, SIGNAL(waitingForConnectionMessage()),
connect(&d->m_outputParser, SIGNAL(waitingForConnectionOnPort(quint16)),
this, SLOT(processIsRunning(quint16)));
connect(&d->m_outputParser, SIGNAL(waitingForConnectionViaOst()),
this, SLOT(processIsRunning()));
connect(&d->m_outputParser, SIGNAL(noOutputMessage()),
this, SLOT(processIsRunning()));
@@ -331,10 +333,19 @@ void QmlProfilerEngine::showNonmodalWarning(const QString &warningMsg)
noExecWarning->show();
}
void QmlProfilerEngine::processIsRunning()
void QmlProfilerEngine::processIsRunning(quint16 port)
{
d->m_noDebugOutputTimer.stop();
emit processRunning(d->m_runner->debugPort());
QTC_ASSERT(port == 0
|| port == d->m_runner->debugPort(),
qWarning() << "Port " << port << "from application output does not match"
<< startParameters().connParams.port << "from start parameters.");
if (port > 0)
emit processRunning(port);
else
emit processRunning(d->m_runner->debugPort());
}
} // namespace Internal