IDevice: Add a qmlProfilerHost function

This seems to be a better abstraction than the "pseudo dynamic cast"
in the QmlProfilerTool and the DebuggerPlugin itself.

Change-Id: If7dea70e1353852ebb6d3ce43220c0b03ccb4b00
Reviewed-by: Christian Kandeler <christian.kandeler@digia.com>
This commit is contained in:
hjk
2013-10-11 12:58:24 +02:00
parent 8f28a37d71
commit a527fbe91c
8 changed files with 21 additions and 16 deletions

View File

@@ -94,8 +94,6 @@
#include <projectexplorer/session.h>
#include <projectexplorer/target.h>
#include <android/androidconstants.h>
#include <texteditor/basetexteditor.h>
#include <texteditor/fontsettings.h>
#include <texteditor/texteditorsettings.h>
@@ -1752,12 +1750,7 @@ void DebuggerPluginPrivate::attachToQmlPort()
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.qmlServerAddress = device->qmlProfilerHost();
}
sp.qmlServerPort = dlg.port();
sp.startMode = AttachToRemoteProcess;