Android: Setup QML debugging

Change-Id: Ida96411f9710bd9a968d4b934fb50f69bf3666fc
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
Reviewed-by: Aurindam Jana <aurindam.jana@digia.com>
This commit is contained in:
Aurindam Jana
2013-04-18 10:01:05 +02:00
parent 714298b370
commit e8c23e1d71
7 changed files with 71 additions and 21 deletions

View File

@@ -345,6 +345,12 @@ QmlEngine::~QmlEngine()
Core::EditorManager::instance()->closeEditors(editorsToClose);
}
void QmlEngine::notifyInferiorSetupOk()
{
emit aboutToNotifyInferiorSetupOk();
DebuggerEngine::notifyInferiorSetupOk();
}
void QmlEngine::setupInferior()
{
QTC_ASSERT(state() == InferiorSetupRequested, qDebug() << state());
@@ -620,6 +626,25 @@ void QmlEngine::notifyEngineRemoteSetupFailed(const QString &message)
notifyEngineSetupFailed();
}
void QmlEngine::notifyEngineRemoteServerRunning(const QByteArray &serverChannel, int pid)
{
bool ok = false;
quint16 qmlPort = serverChannel.toUInt(&ok);
if (ok)
startParameters().qmlServerPort = qmlPort;
else
qWarning() << tr("QML debugging port not set! Unable to convert %1 to unsigned int.").arg(QString::fromLatin1(serverChannel));
DebuggerEngine::notifyEngineRemoteServerRunning(serverChannel, pid);
notifyEngineSetupOk();
// The remote setup can take a while especially with mixed debugging.
// Just waiting for 8 seconds is not enough. Increase the timeout
// to 60 s
// In case we get an output the m_outputParser will start the connection.
m_noDebugOutputTimer.setInterval(60000);
}
void QmlEngine::shutdownInferior()
{
if (m_adapter.activeDebuggerClient())