Commit 86c14292 authored by Aurindam Jana's avatar Aurindam Jana Committed by Kai Koehne

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: default avatarKai Koehne <kai.koehne@digia.com>
Reviewed-by: default avatarhjk <qthjk@ovi.com>
Reviewed-by: default avatarEike Ziller <eike.ziller@digia.com>
parent 492ca1cb
......@@ -1759,6 +1759,7 @@ void DebuggerPluginPrivate::attachToQmlPort()
sp.startMode = AttachToRemoteProcess;
sp.closeMode = KillAtClose;
sp.languages = QmlLanguage;
sp.masterEngineType = QmlEngineType;
//
// get files from all the projects in the session
......
......@@ -417,17 +417,21 @@ void QmlEngine::beginConnection(quint16 port)
QTC_ASSERT(state() == EngineRunRequested, return);
QString host = startParameters().qmlServerAddress;
// Use localhost as default
if (host.isEmpty())
host = QLatin1String("localhost");
if (port > 0) {
QTC_ASSERT(startParameters().connParams.port == 0
|| startParameters().connParams.port == port,
qWarning() << "Port " << port << "from application output does not match"
<< startParameters().connParams.port << "from start parameters.");
m_adapter.beginConnectionTcp(startParameters().qmlServerAddress, port);
m_adapter.beginConnectionTcp(host, port);
return;
}
// no port from application output, use the one from start parameters ...
m_adapter.beginConnectionTcp(startParameters().qmlServerAddress,
startParameters().qmlServerPort);
m_adapter.beginConnectionTcp(host, startParameters().qmlServerPort);
}
void QmlEngine::connectionStartupFailed()
......
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