summaryrefslogtreecommitdiffstats
path: root/tests/auto/declarative/qdeclarativedebugservice
diff options
context:
space:
mode:
authorLasse Holmstedt <lasse.holmstedt@nokia.com>2010-09-17 08:13:51 (GMT)
committerKai Koehne <kai.koehne@nokia.com>2010-09-17 13:51:18 (GMT)
commita9e5329168cd9113bf41293c05193d8b099494c6 (patch)
treedaaf47e37ff0343596cc3c2e67afe25251be8b32 /tests/auto/declarative/qdeclarativedebugservice
parent2046037499830506ec24097c9b7a739bb7c78566 (diff)
downloadQt-a9e5329168cd9113bf41293c05193d8b099494c6.zip
Qt-a9e5329168cd9113bf41293c05193d8b099494c6.tar.gz
Qt-a9e5329168cd9113bf41293c05193d8b099494c6.tar.bz2
Make qml debugging work with command line arguments
The environment variables do not work for Symbian devices, so without this change, QML debugging cannot be done on them. In addition, configure now contains an option to disable qml debugging entirely, due to it being a major security risk. Reviewed-by: kkoehne
Diffstat (limited to 'tests/auto/declarative/qdeclarativedebugservice')
-rw-r--r--tests/auto/declarative/qdeclarativedebugservice/tst_qdeclarativedebugservice.cpp16
1 files changed, 14 insertions, 2 deletions
diff --git a/tests/auto/declarative/qdeclarativedebugservice/tst_qdeclarativedebugservice.cpp b/tests/auto/declarative/qdeclarativedebugservice/tst_qdeclarativedebugservice.cpp
index 9ebbbaf..4683199 100644
--- a/tests/auto/declarative/qdeclarativedebugservice/tst_qdeclarativedebugservice.cpp
+++ b/tests/auto/declarative/qdeclarativedebugservice/tst_qdeclarativedebugservice.cpp
@@ -77,7 +77,6 @@ private slots:
void tst_QDeclarativeDebugService::initTestCase()
{
QTest::ignoreMessage(QtWarningMsg, "QDeclarativeDebugServer: Waiting for connection on port 3769...");
- qputenv("QML_DEBUG_SERVER_PORT", "3769");
new QDeclarativeEngine(this);
m_conn = new QDeclarativeDebugConnection(this);
@@ -184,6 +183,19 @@ void tst_QDeclarativeDebugService::objectToString()
delete obj;
}
-QTEST_MAIN(tst_QDeclarativeDebugService)
+
+int main(int argc, char *argv[])
+{
+ int _argc = argc + 1;
+ char **_argv = new char*[_argc];
+ for (int i = 0; i < argc; ++i)
+ _argv[i] = argv[i];
+ _argv[_argc - 1] = "-qmljsdebugger=port:3769";
+
+ QApplication app(_argc, _argv);
+ tst_QDeclarativeDebugService tc;
+ return QTest::qExec(&tc, _argc, _argv);
+ delete _argv;
+}
#include "tst_qdeclarativedebugservice.moc"