diff options
author | Fabian Kosmale <fabian.kosmale@qt.io> | 2025-08-01 17:00:54 +0200 |
---|---|---|
committer | Fabian Kosmale <fabian.kosmale@qt.io> | 2025-08-10 16:32:05 +0200 |
commit | 583d16c1075e1e2e85dfb800339076f911e4f8da (patch) | |
tree | e0fc58fdad4d6a500941242bf2968c617f0a3518 /tests | |
parent | aeaa7ae43e59e165d17f3726eda11fb70271d45a (diff) |
The engine handles this just fine, and we had examples (and probably
documentation) shownig this pattern.
If we want to warn about it, it should have a dedicated warning.
Pick-to: 6.10
Change-Id: I105f4a49ecfc6fbd5f00c683e0dbef7d34a64a1d
Reviewed-by: Olivier De Cannière <olivier.decanniere@qt.io>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/auto/qml/qmllint/data/singleElementAssignedToList.qml | 7 | ||||
-rw-r--r-- | tests/auto/qml/qmllint/tst_qmllint.cpp | 1 |
2 files changed, 8 insertions, 0 deletions
diff --git a/tests/auto/qml/qmllint/data/singleElementAssignedToList.qml b/tests/auto/qml/qmllint/data/singleElementAssignedToList.qml new file mode 100644 index 0000000000..c8ea6adc72 --- /dev/null +++ b/tests/auto/qml/qmllint/data/singleElementAssignedToList.qml @@ -0,0 +1,7 @@ +import QtQuick + +Item { +id:root + property Item myrect: Rectangle {id: rect1 } + data: rect1 +} diff --git a/tests/auto/qml/qmllint/tst_qmllint.cpp b/tests/auto/qml/qmllint/tst_qmllint.cpp index 41817d4288..3f2e2e707c 100644 --- a/tests/auto/qml/qmllint/tst_qmllint.cpp +++ b/tests/auto/qml/qmllint/tst_qmllint.cpp @@ -2173,6 +2173,7 @@ void TestQmllint::cleanQmlCode_data() QTest::newRow("setRequiredTroughAliasOfAlias") << QStringLiteral("setRequiredPropertyThroughAliasOfAlias.qml"); QTest::newRow("shapes") << QStringLiteral("shapes.qml"); + QTest::newRow("singleElementAssignedToList") << QStringLiteral("singleElementAssignedToList.qml"); QTest::newRow("stringLength") << QStringLiteral("stringLength.qml"); QTest::newRow("stringLength2") << QStringLiteral("stringLength2.qml"); QTest::newRow("stringLength3") << QStringLiteral("stringLength3.qml"); |