diff options
Diffstat (limited to 'tests/auto/qml/qqmllanguage/tst_qqmllanguage.cpp')
-rw-r--r-- | tests/auto/qml/qqmllanguage/tst_qqmllanguage.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/auto/qml/qqmllanguage/tst_qqmllanguage.cpp b/tests/auto/qml/qqmllanguage/tst_qqmllanguage.cpp index 826bd124b7..07644bef16 100644 --- a/tests/auto/qml/qqmllanguage/tst_qqmllanguage.cpp +++ b/tests/auto/qml/qqmllanguage/tst_qqmllanguage.cpp @@ -117,6 +117,7 @@ private slots: void dynamicSignalsAndSlots(); void simpleBindings(); void autoComponentCreation(); + void autoComponentCreationInGroupProperty(); void propertyValueSource(); void attachedProperties(); void dynamicObjects(); @@ -1351,6 +1352,18 @@ void tst_qqmllanguage::autoComponentCreation() QCOMPARE(child->realProperty(), qreal(9)); } +void tst_qqmllanguage::autoComponentCreationInGroupProperty() +{ + QQmlComponent component(&engine, testFileUrl("autoComponentCreationInGroupProperties.qml")); + VERIFY_ERRORS(0); + MyTypeObject *object = qobject_cast<MyTypeObject *>(component.create()); + QVERIFY(object != 0); + QVERIFY(object->componentProperty() != 0); + MyTypeObject *child = qobject_cast<MyTypeObject *>(object->componentProperty()->create()); + QVERIFY(child != 0); + QCOMPARE(child->realProperty(), qreal(9)); +} + void tst_qqmllanguage::propertyValueSource() { { |