QmlDebugger: Fix Remote QML Debugging

The host address is now retreived from the kit info.
Incase, a device is not associated with the given kit,
the host is assumed to be localhost.

Change-Id: I659d2d64ec78dc1b10c80c97390994a56ff26344
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
Reviewed-by: hjk <qthjk@ovi.com>
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
This commit is contained in:
Aurindam Jana
2012-11-06 15:46:19 +01:00
committed by Kai Koehne
parent 492ca1cbcf
commit 86c14292d2
2 changed files with 8 additions and 3 deletions

View File

@@ -1759,6 +1759,7 @@ void DebuggerPluginPrivate::attachToQmlPort()
sp.startMode = AttachToRemoteProcess; sp.startMode = AttachToRemoteProcess;
sp.closeMode = KillAtClose; sp.closeMode = KillAtClose;
sp.languages = QmlLanguage; sp.languages = QmlLanguage;
sp.masterEngineType = QmlEngineType;
// //
// get files from all the projects in the session // get files from all the projects in the session

View File

@@ -417,17 +417,21 @@ void QmlEngine::beginConnection(quint16 port)
QTC_ASSERT(state() == EngineRunRequested, return); QTC_ASSERT(state() == EngineRunRequested, return);
QString host = startParameters().qmlServerAddress;
// Use localhost as default
if (host.isEmpty())
host = QLatin1String("localhost");
if (port > 0) { if (port > 0) {
QTC_ASSERT(startParameters().connParams.port == 0 QTC_ASSERT(startParameters().connParams.port == 0
|| startParameters().connParams.port == port, || startParameters().connParams.port == port,
qWarning() << "Port " << port << "from application output does not match" qWarning() << "Port " << port << "from application output does not match"
<< startParameters().connParams.port << "from start parameters."); << startParameters().connParams.port << "from start parameters.");
m_adapter.beginConnectionTcp(startParameters().qmlServerAddress, port); m_adapter.beginConnectionTcp(host, port);
return; return;
} }
// no port from application output, use the one from start parameters ... // no port from application output, use the one from start parameters ...
m_adapter.beginConnectionTcp(startParameters().qmlServerAddress, m_adapter.beginConnectionTcp(host, startParameters().qmlServerPort);
startParameters().qmlServerPort);
} }
void QmlEngine::connectionStartupFailed() void QmlEngine::connectionStartupFailed()