diff options
Diffstat (limited to 'tests')
3 files changed, 41 insertions, 6 deletions
diff --git a/tests/auto/declarative/qdeclarativedebug/tst_qdeclarativedebug.cpp b/tests/auto/declarative/qdeclarativedebug/tst_qdeclarativedebug.cpp index 20ccccb..adba190 100644 --- a/tests/auto/declarative/qdeclarativedebug/tst_qdeclarativedebug.cpp +++ b/tests/auto/declarative/qdeclarativedebug/tst_qdeclarativedebug.cpp @@ -279,7 +279,7 @@ void tst_QDeclarativeDebug::initTestCase() qRegisterMetaType<QDeclarativeDebugWatch::State>(); QTest::ignoreMessage(QtWarningMsg, "QDeclarativeDebugServer: Waiting for connection on port 3768..."); - qputenv("QML_DEBUG_SERVER_PORT", "3768"); + m_engine = new QDeclarativeEngine(this); QList<QByteArray> qml; @@ -891,6 +891,18 @@ void tst_QDeclarativeDebug::tst_QDeclarativeDebugPropertyReference() compareProperties(r, ref); } -QTEST_MAIN(tst_QDeclarativeDebug) +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:3768"; + + QApplication app(_argc, _argv); + tst_QDeclarativeDebug tc; + return QTest::qExec(&tc, _argc, _argv); + delete _argv; +} #include "tst_qdeclarativedebug.moc" diff --git a/tests/auto/declarative/qdeclarativedebugclient/tst_qdeclarativedebugclient.cpp b/tests/auto/declarative/qdeclarativedebugclient/tst_qdeclarativedebugclient.cpp index a19c2c2..7db0e60 100644 --- a/tests/auto/declarative/qdeclarativedebugclient/tst_qdeclarativedebugclient.cpp +++ b/tests/auto/declarative/qdeclarativedebugclient/tst_qdeclarativedebugclient.cpp @@ -76,7 +76,6 @@ void tst_QDeclarativeDebugClient::initTestCase() { QTest::ignoreMessage(QtWarningMsg, "QDeclarativeDebugServer: Waiting for connection on port 3770..."); - qputenv("QML_DEBUG_SERVER_PORT", "3770"); new QDeclarativeEngine(this); m_conn = new QDeclarativeDebugConnection(this); @@ -151,7 +150,19 @@ void tst_QDeclarativeDebugClient::sendMessage() QCOMPARE(resp, msg); } -QTEST_MAIN(tst_QDeclarativeDebugClient) +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:3770"; + + QApplication app(_argc, _argv); + tst_QDeclarativeDebugClient tc; + return QTest::qExec(&tc, _argc, _argv); + delete _argv; +} #include "tst_qdeclarativedebugclient.moc" 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" |