diff options
Diffstat (limited to 'tests/auto/quick/qquickloader/tst_qquickloader.cpp')
-rw-r--r-- | tests/auto/quick/qquickloader/tst_qquickloader.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/auto/quick/qquickloader/tst_qquickloader.cpp b/tests/auto/quick/qquickloader/tst_qquickloader.cpp index a53b08d1b7..698f410f9f 100644 --- a/tests/auto/quick/qquickloader/tst_qquickloader.cpp +++ b/tests/auto/quick/qquickloader/tst_qquickloader.cpp @@ -114,6 +114,7 @@ private slots: void asyncToSync1(); void asyncToSync2(); void loadedSignal(); + void selfSetSource(); void parented(); void sizeBound(); @@ -1142,6 +1143,17 @@ void tst_QQuickLoader::loadedSignal() } } +void tst_QQuickLoader::selfSetSource() +{ + QQmlEngine engine; + QQmlComponent component(&engine, testFileUrl("selfSetSourceTest.qml")); + + QScopedPointer<QObject> obj(component.create()); + QVERIFY(obj); + + QTRY_COMPARE(obj->property("source").toUrl(), testFileUrl("empty.qml")); +} + void tst_QQuickLoader::parented() { QQmlEngine engine; |