From f15595901b645fc3c168ef18f81ae4617b439e92 Mon Sep 17 00:00:00 2001 From: Aurindam Jana Date: Mon, 18 Mar 2013 17:17:52 +0100 Subject: Debugger: Accepts port range as arguments Allow a port range to pass on command line, and try to listen on any of the ports in the range. (Re)using the ',' separator allows for backwards compatibility, that is, also Qt 4 will accept a -qmljsdebugger=port:1000,1010 argument, but will only try to listen on port 1000. Change-Id: Ic03fe20e4aee9ecdea86651f46f1df5cb19bd75c Reviewed-by: Kai Koehne --- tests/auto/qml/debugger/qqmldebugjs/tst_qqmldebugjs.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'tests/auto/qml/debugger/qqmldebugjs') diff --git a/tests/auto/qml/debugger/qqmldebugjs/tst_qqmldebugjs.cpp b/tests/auto/qml/debugger/qqmldebugjs/tst_qqmldebugjs.cpp index 3d5d4d5243..9c2ba5bcde 100644 --- a/tests/auto/qml/debugger/qqmldebugjs/tst_qqmldebugjs.cpp +++ b/tests/auto/qml/debugger/qqmldebugjs/tst_qqmldebugjs.cpp @@ -124,8 +124,8 @@ const char *UNCAUGHT = "uncaught"; //const char *PAUSE = "pause"; //const char *RESUME = "resume"; -const char *BLOCKMODE = "-qmljsdebugger=port:3771,block"; -const char *NORMALMODE = "-qmljsdebugger=port:3771"; +const char *BLOCKMODE = "-qmljsdebugger=port:3771,3800,block"; +const char *NORMALMODE = "-qmljsdebugger=port:3771,3800"; const char *TEST_QMLFILE = "test.qml"; const char *TEST_JSFILE = "test.js"; const char *TIMER_QMLFILE = "timer.qml"; @@ -1015,7 +1015,8 @@ bool tst_QQmlDebugJS::init(const QString &qmlFile, bool blockMode) return false; } - connection->connectToHost("127.0.0.1", 3771); + const int port = process->debugPort(); + connection->connectToHost("127.0.0.1", port); if (!connection->waitForConnected()) { qDebug() << "could not connect to host!"; return false; -- cgit v1.2.3