diff options
author | Simon Hausmann <simon.hausmann@theqtcompany.com> | 2015-04-27 09:52:51 +0200 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@theqtcompany.com> | 2015-04-27 14:40:00 +0200 |
commit | e2447f9f5fbe6c8c070ce454bb48c5e45b8c35b3 (patch) | |
tree | 5ea8ffde57b47a44577ca79b90daafab52eedd1b /tests/auto/qml/qqmlmoduleplugin | |
parent | 8018c4b6e7743c576a3548f6e73e588f19f632a9 (diff) | |
parent | 7302bc550aa75600c7cdcf5c3d34404e0a09cf67 (diff) |
Merge remote-tracking branch 'origin/5.4' into 5.5
Conflicts:
.qmake.conf
tests/auto/qml/qqmlxmlhttprequest/tst_qqmlxmlhttprequest.cpp
Change-Id: I715b8a78b74cbe0dcaf599367fd6e08af4858e11
Diffstat (limited to 'tests/auto/qml/qqmlmoduleplugin')
-rw-r--r-- | tests/auto/qml/qqmlmoduleplugin/tst_qqmlmoduleplugin.cpp | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/tests/auto/qml/qqmlmoduleplugin/tst_qqmlmoduleplugin.cpp b/tests/auto/qml/qqmlmoduleplugin/tst_qqmlmoduleplugin.cpp index 87136aa6de..0e326abad9 100644 --- a/tests/auto/qml/qqmlmoduleplugin/tst_qqmlmoduleplugin.cpp +++ b/tests/auto/qml/qqmlmoduleplugin/tst_qqmlmoduleplugin.cpp @@ -44,9 +44,6 @@ #include "../../shared/testhttpserver.h" #include "../../shared/util.h" -#define SERVER_ADDR "http://127.0.0.1:14456" -#define SERVER_PORT 14456 - // Note: this test does not use module identifier directives in the qmldir files, because // it would result in repeated attempts to insert types into the same namespace. // This occurs because type registration is process-global, while the test @@ -240,12 +237,13 @@ void tst_qqmlmoduleplugin::importPluginWithQmlFile() void tst_qqmlmoduleplugin::remoteImportWithQuotedUrl() { TestHTTPServer server; - QVERIFY2(server.listen(SERVER_PORT), qPrintable(server.errorString())); + QVERIFY2(server.listen(), qPrintable(server.errorString())); server.serveDirectory(m_dataImportsDirectory); QQmlEngine engine; QQmlComponent component(&engine); - component.setData("import \"" SERVER_ADDR "/org/qtproject/PureQmlModule\" \nComponentA { width: 300; ComponentB{} }", QUrl()); + const QString qml = "import \"" + server.urlString("/org/qtproject/PureQmlModule") + "\" \nComponentA { width: 300; ComponentB{} }"; + component.setData(qml.toUtf8(), QUrl()); QTRY_COMPARE(component.status(), QQmlComponent::Ready); QObject *object = component.create(); @@ -261,7 +259,7 @@ void tst_qqmlmoduleplugin::remoteImportWithQuotedUrl() void tst_qqmlmoduleplugin::remoteImportWithUnquotedUri() { TestHTTPServer server; - QVERIFY2(server.listen(SERVER_PORT), qPrintable(server.errorString())); + QVERIFY2(server.listen(), qPrintable(server.errorString())); server.serveDirectory(m_dataImportsDirectory); QQmlEngine engine; |