diff options
author | Evgeniy A. Dushistov <dushistov@mail.ru> | 2020-06-17 23:39:28 +0300 |
---|---|---|
committer | Evgeniy A. Dushistov <dushistov@mail.ru> | 2020-06-18 11:21:18 +0300 |
commit | b916c1bffdd4bcaaa6d4d75d2a9efa34a485cff5 (patch) | |
tree | de9498b87eb4bdb2156507b126079f627819fc45 /tests/auto/qml/qmllint | |
parent | e8d9bc1bcada7d94af5a33d64a9afc860ede5b84 (diff) |
qmllint: high level item can also be list
Fixes: QTBUG-84300
Change-Id: I1a9db060cdeb7c4ec10deedab5141a06245a55b2
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Diffstat (limited to 'tests/auto/qml/qmllint')
-rw-r--r-- | tests/auto/qml/qmllint/data/ListProperty.qml | 6 | ||||
-rw-r--r-- | tests/auto/qml/qmllint/data/Things/plugins.qmltypes | 16 | ||||
-rw-r--r-- | tests/auto/qml/qmllint/tst_qmllint.cpp | 1 |
3 files changed, 23 insertions, 0 deletions
diff --git a/tests/auto/qml/qmllint/data/ListProperty.qml b/tests/auto/qml/qmllint/data/ListProperty.qml new file mode 100644 index 0000000000..d2bbc58cc5 --- /dev/null +++ b/tests/auto/qml/qmllint/data/ListProperty.qml @@ -0,0 +1,6 @@ +import QtQuick 2.12 +import Things 1.0 + +Frame { + contentWidth: contentChildren.length === 1 ? contentChildren[0].implicitWidth : 0 +} diff --git a/tests/auto/qml/qmllint/data/Things/plugins.qmltypes b/tests/auto/qml/qmllint/data/Things/plugins.qmltypes index 9d81c21070..95ff95eb7d 100644 --- a/tests/auto/qml/qmllint/data/Things/plugins.qmltypes +++ b/tests/auto/qml/qmllint/data/Things/plugins.qmltypes @@ -14,4 +14,20 @@ Module { } Property { name: "palette"; type: "QPalette" } } + Component { + name: "Frame" + prototype: "MyPane" + exports: ["Things.Templates/Frame 1.0"] + exportMetaObjectRevisions: [0] + } + Component { + name: "MyPane" + prototype: "QObject" + exports: ["Things.Templates/Pane 1.0"] + exportMetaObjectRevisions: [0] + Property { name: "contentWidth"; type: "double" } + Property { name: "contentHeight"; type: "double" } + Property { name: "contentData"; type: "QObject"; isList: true; isReadonly: true } + Property { name: "contentChildren"; type: "QQuickItem"; isList: true; isReadonly: true } + } } diff --git a/tests/auto/qml/qmllint/tst_qmllint.cpp b/tests/auto/qml/qmllint/tst_qmllint.cpp index 2c7998b571..7459a813be 100644 --- a/tests/auto/qml/qmllint/tst_qmllint.cpp +++ b/tests/auto/qml/qmllint/tst_qmllint.cpp @@ -222,6 +222,7 @@ void TestQmllint::cleanQmlCode_data() QTest::newRow("qualifiedAttached") << QStringLiteral("Drawer.qml"); QTest::newRow("EnumAccess1") << QStringLiteral("EnumAccess1.qml"); QTest::newRow("EnumAccess2") << QStringLiteral("EnumAccess2.qml"); + QTest::newRow("ListProperty") << QStringLiteral("ListProperty.qml"); } void TestQmllint::cleanQmlCode() |