aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/qml/qqmllanguage
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/qml/qqmllanguage')
-rw-r--r--tests/auto/qml/qqmllanguage/data/ConcurrentLoadA.qml7
-rw-r--r--tests/auto/qml/qqmllanguage/data/ConcurrentLoadB.qml7
-rw-r--r--tests/auto/qml/qqmllanguage/data/concurrentLoad_main.qml5
-rw-r--r--tests/auto/qml/qqmllanguage/tst_qqmllanguage.cpp16
4 files changed, 35 insertions, 0 deletions
diff --git a/tests/auto/qml/qqmllanguage/data/ConcurrentLoadA.qml b/tests/auto/qml/qqmllanguage/data/ConcurrentLoadA.qml
new file mode 100644
index 0000000000..3d538c7572
--- /dev/null
+++ b/tests/auto/qml/qqmllanguage/data/ConcurrentLoadA.qml
@@ -0,0 +1,7 @@
+import QtQuick 2.0
+import testModule 1.0
+
+Item {
+ Test {}
+}
+
diff --git a/tests/auto/qml/qqmllanguage/data/ConcurrentLoadB.qml b/tests/auto/qml/qqmllanguage/data/ConcurrentLoadB.qml
new file mode 100644
index 0000000000..3d538c7572
--- /dev/null
+++ b/tests/auto/qml/qqmllanguage/data/ConcurrentLoadB.qml
@@ -0,0 +1,7 @@
+import QtQuick 2.0
+import testModule 1.0
+
+Item {
+ Test {}
+}
+
diff --git a/tests/auto/qml/qqmllanguage/data/concurrentLoad_main.qml b/tests/auto/qml/qqmllanguage/data/concurrentLoad_main.qml
new file mode 100644
index 0000000000..8cfc90ac96
--- /dev/null
+++ b/tests/auto/qml/qqmllanguage/data/concurrentLoad_main.qml
@@ -0,0 +1,5 @@
+import QtQuick 2.0
+Rectangle {
+ConcurrentLoadA {}
+ConcurrentLoadB {}
+}
diff --git a/tests/auto/qml/qqmllanguage/tst_qqmllanguage.cpp b/tests/auto/qml/qqmllanguage/tst_qqmllanguage.cpp
index cc5b8cacbc..15f19d550b 100644
--- a/tests/auto/qml/qqmllanguage/tst_qqmllanguage.cpp
+++ b/tests/auto/qml/qqmllanguage/tst_qqmllanguage.cpp
@@ -267,6 +267,8 @@ private slots:
void instanceof_data();
void instanceof();
+ void concurrentLoadQmlDir();
+
private:
QQmlEngine engine;
QStringList defaultImportPathList;
@@ -4559,6 +4561,20 @@ void tst_qqmllanguage::instanceof()
}
}
+void tst_qqmllanguage::concurrentLoadQmlDir()
+{
+ ThreadedTestHTTPServer server(dataDirectory());
+ QString serverdir = server.urlString("/lib/");
+ engine.setImportPathList(QStringList(defaultImportPathList) << serverdir);
+
+ QQmlComponent component(&engine, testFileUrl("concurrentLoad_main.qml"));
+ QTRY_VERIFY(component.isReady());
+ VERIFY_ERRORS(0);
+ QScopedPointer<QObject> o(component.create());
+ QVERIFY(!o.isNull());
+ engine.setImportPathList(defaultImportPathList);
+}
+
QTEST_MAIN(tst_qqmllanguage)
#include "tst_qqmllanguage.moc"