aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto
diff options
context:
space:
mode:
authorUlf Hermann <ulf.hermann@qt.io>2023-01-23 14:29:27 +0100
committerUlf Hermann <ulf.hermann@qt.io>2023-01-23 22:27:38 +0100
commitc9b8b061170ab3974754249f8bb1d3356c839fd1 (patch)
treeb7d0357519f8797e61c7de26e8f6ee8c03ff7ea2 /tests/auto
parent2525d357339ad73c4bb753294b19f52f6cc3aeb8 (diff)
QmlCompiler: Wrap sequences with unknown elemnts in QVariantList
Otherwise we later try to perform value type lookups on them. That won't work. Pick-to: 6.5 Task-number: QTBUG-110438 Change-Id: I1690a3375841ba5a1ff1a471a7f88bd2023ab4c4 Reviewed-by: Semih Yavuz <semih.yavuz@qt.io> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Diffstat (limited to 'tests/auto')
-rw-r--r--tests/auto/qml/qmlcppcodegen/data/badSequence.qml1
-rw-r--r--tests/auto/qml/qmlcppcodegen/tst_qmlcppcodegen.cpp1
2 files changed, 2 insertions, 0 deletions
diff --git a/tests/auto/qml/qmlcppcodegen/data/badSequence.qml b/tests/auto/qml/qmlcppcodegen/data/badSequence.qml
index 5b0742ab6a..785765ec74 100644
--- a/tests/auto/qml/qmlcppcodegen/data/badSequence.qml
+++ b/tests/auto/qml/qmlcppcodegen/data/badSequence.qml
@@ -3,4 +3,5 @@ import TestTypes
Person {
property Person other: Person { id: oo }
barzles: oo.barzles
+ property int l: oo.barzles.length
}
diff --git a/tests/auto/qml/qmlcppcodegen/tst_qmlcppcodegen.cpp b/tests/auto/qml/qmlcppcodegen/tst_qmlcppcodegen.cpp
index 405e65853a..97d0d0e58a 100644
--- a/tests/auto/qml/qmlcppcodegen/tst_qmlcppcodegen.cpp
+++ b/tests/auto/qml/qmlcppcodegen/tst_qmlcppcodegen.cpp
@@ -2477,6 +2477,7 @@ void tst_QmlCppCodegen::badSequence()
other->setBarzles(barzles);
QCOMPARE(self->barzles(), barzles);
+ QCOMPARE(self->property("l").toInt(), 2);
}
void tst_QmlCppCodegen::enumLookup()