aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/qml/qqmlqt/tst_qqmlqt.cpp
diff options
context:
space:
mode:
authorMartin Jones <martin.jones@nokia.com>2012-03-06 18:03:33 +1000
committerQt by Nokia <qt-info@nokia.com>2012-03-15 10:14:37 +0100
commit31467e8649979d06ea2f676768016e6a147eadb9 (patch)
treeb318865886c33aa266141870972adc03900522e0 /tests/auto/qml/qqmlqt/tst_qqmlqt.cpp
parentb634c19680cd1d4dd925a18e616844ed420d18ae (diff)
Allow threaded compilation in an async Loader
Enables threaded compilation for a Loader "source". Change-Id: I2d60a3ace07aab58f3b8f069e45a2864178c959f Reviewed-by: Chris Adams <christopher.adams@nokia.com>
Diffstat (limited to 'tests/auto/qml/qqmlqt/tst_qqmlqt.cpp')
-rw-r--r--tests/auto/qml/qqmlqt/tst_qqmlqt.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/auto/qml/qqmlqt/tst_qqmlqt.cpp b/tests/auto/qml/qqmlqt/tst_qqmlqt.cpp
index a679188cb7..d3dc3e7343 100644
--- a/tests/auto/qml/qqmlqt/tst_qqmlqt.cpp
+++ b/tests/auto/qml/qqmlqt/tst_qqmlqt.cpp
@@ -395,6 +395,7 @@ void tst_qqmlqt::md5()
void tst_qqmlqt::createComponent()
{
+ {
QQmlComponent component(&engine, testFileUrl("createComponent.qml"));
QString warning1 = component.url().toString() + ":9: Error: Qt.createComponent(): Invalid arguments";
@@ -408,7 +409,19 @@ void tst_qqmlqt::createComponent()
QCOMPARE(object->property("absoluteUrl").toString(), QString("http://www.example.com/test.qml"));
QCOMPARE(object->property("relativeUrl").toString(), testFileUrl("createComponentData.qml").toString());
+ QTRY_VERIFY(object->property("asyncResult").toBool());
+
delete object;
+ }
+
+ // simultaneous sync and async compilation
+ {
+ QQmlComponent component(&engine, testFileUrl("createComponent.2.qml"));
+ QObject *object = component.create();
+ QVERIFY(object != 0);
+ QTRY_VERIFY(object->property("success").toBool());
+ delete object;
+ }
}
void tst_qqmlqt::createComponent_pragmaLibrary()