summaryrefslogtreecommitdiff
path: root/src/plugins/android/androiddebugsupport.cpp
diff options
context:
space:
mode:
authorAurindam Jana <aurindam.jana@digia.com>2013-04-18 10:01:05 +0200
committerAurindam Jana <aurindam.jana@digia.com>2013-04-23 12:06:29 +0200
commite8c23e1d713733a47d2eb169f0c7dc0f9508a2b9 (patch)
tree1feef94769f9d5eb86085c6fc075b1ab0dfc07c3 /src/plugins/android/androiddebugsupport.cpp
parent714298b3705eb8b47ecac68ace0038901b88bdca (diff)
downloadqt-creator-e8c23e1d713733a47d2eb169f0c7dc0f9508a2b9.tar.gz
Android: Setup QML debugging
Change-Id: Ida96411f9710bd9a968d4b934fb50f69bf3666fc Reviewed-by: Kai Koehne <kai.koehne@digia.com> Reviewed-by: Aurindam Jana <aurindam.jana@digia.com>
Diffstat (limited to 'src/plugins/android/androiddebugsupport.cpp')
-rw-r--r--src/plugins/android/androiddebugsupport.cpp10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/plugins/android/androiddebugsupport.cpp b/src/plugins/android/androiddebugsupport.cpp
index d716e7b610..96c9c4c80d 100644
--- a/src/plugins/android/androiddebugsupport.cpp
+++ b/src/plugins/android/androiddebugsupport.cpp
@@ -49,6 +49,7 @@
#include <qtsupport/qtkitinformation.h>
#include <QDir>
+#include <QTcpServer>
using namespace Debugger;
using namespace ProjectExplorer;
@@ -113,8 +114,11 @@ RunControl *AndroidDebugSupport::createDebugRunControl(AndroidRunConfiguration *
}
if (aspect->useQmlDebugger()) {
params.languages |= QmlLanguage;
- params.qmlServerAddress = QLatin1String("localhost");
- params.qmlServerPort = aspect->qmlDebugServerPort();
+ QTcpServer server;
+ QTC_ASSERT(server.listen(QHostAddress::LocalHost)
+ || server.listen(QHostAddress::LocalHostIPv6), return 0);
+ params.qmlServerAddress = server.serverAddress().toString();
+ params.remoteSetupNeeded = true;
//TODO: Not sure if these are the right paths.
params.projectSourceDirectory = project->projectDirectory();
params.projectSourceFiles = project->files(Qt4Project::ExcludeGeneratedFiles);
@@ -141,7 +145,7 @@ AndroidDebugSupport::AndroidDebugSupport(AndroidRunConfiguration *runConfig,
connect(m_runControl, SIGNAL(finished()),
m_runner, SLOT(stop()));
connect(m_runControl->engine(), SIGNAL(aboutToNotifyInferiorSetupOk()),
- m_runner, SLOT(handleGdbRunning()));
+ m_runner, SLOT(handleRemoteDebuggerRunning()));
connect(m_runner, SIGNAL(remoteServerRunning(QByteArray,int)),
SLOT(handleRemoteServerRunning(QByteArray,int)));