Commit 8fe5ac40 authored by Aurindam Jana's avatar Aurindam Jana
Browse files

QmlDebugging: Set correct host when attaching to an application



Change-Id: I32030b5320f6de129af77fbde28cf7a4a048d9dc
Reviewed-by: default avatarKai Koehne <kai.koehne@digia.com>
parent 9b8b8ba9
......@@ -92,6 +92,8 @@
#include <projectexplorer/session.h>
#include <projectexplorer/target.h>
#include <android/androidconstants.h>
#include <texteditor/basetexteditor.h>
#include <texteditor/fontsettings.h>
#include <texteditor/texteditorsettings.h>
......@@ -1754,7 +1756,16 @@ void DebuggerPluginPrivate::attachToQmlPort()
setConfigValue(_("LastQmlServerPort"), dlg.port());
setConfigValue(_("LastProfile"), kit->id().toSetting());
sp.qmlServerAddress = sp.connParams.host;
IDevice::ConstPtr device = DeviceKitInformation::device(kit);
if (device) {
sp.connParams = device->sshParameters();
if (device->type() == ProjectExplorer::Constants::DESKTOP_DEVICE_TYPE
|| device->type() == Android::Constants::ANDROID_DEVICE_TYPE) {
sp.qmlServerAddress = QLatin1String("localhost");
} else {
sp.qmlServerAddress = sp.connParams.host;
}
}
sp.qmlServerPort = dlg.port();
sp.startMode = AttachToRemoteProcess;
sp.closeMode = KillAtClose;
......
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