From 7b7fb7fe3ab8ce5db744329b2f138fd8b2a811ea Mon Sep 17 00:00:00 2001 From: Simon Hausmann Date: Wed, 23 Nov 2016 09:47:48 +0100 Subject: Fix support for QML declared default list properties The grammar was not permitting to write default property list myChildren; and instead developers had to work around it with an alias property list myChildrenData; default property alias myChildren: myChildrenData which is not nice. Fortunately this is easy to fix in the grammar. Task-number: QTBUG-10822 Change-Id: I4e914ddb9588913da09e9fb6c6aa154cf8a9e18f Reviewed-by: Lars Knoll --- tests/auto/qml/qqmllanguage/tst_qqmllanguage.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'tests/auto/qml/qqmllanguage/tst_qqmllanguage.cpp') diff --git a/tests/auto/qml/qqmllanguage/tst_qqmllanguage.cpp b/tests/auto/qml/qqmllanguage/tst_qqmllanguage.cpp index ad06946b0b..658b4f5852 100644 --- a/tests/auto/qml/qqmllanguage/tst_qqmllanguage.cpp +++ b/tests/auto/qml/qqmllanguage/tst_qqmllanguage.cpp @@ -254,6 +254,8 @@ private slots: void arrayBuffer_data(); void arrayBuffer(); + void defaultListProperty(); + private: QQmlEngine engine; QStringList defaultImportPathList; @@ -4233,6 +4235,13 @@ void tst_qqmllanguage::arrayBuffer() QCOMPARE(object->property("ok").toBool(), true); } +void tst_qqmllanguage::defaultListProperty() +{ + QQmlComponent component(&engine, testFileUrl("defaultListProperty.qml")); + VERIFY_ERRORS(0); + QScopedPointer o(component.create()); +} + QTEST_MAIN(tst_qqmllanguage) #include "tst_qqmllanguage.moc" -- cgit v1.2.3