aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/qml/qmlcppcodegen/data/variantMapLookup.qml
diff options
context:
space:
mode:
authorOlivier De Cannière <olivier.decanniere@qt.io>2023-02-20 09:57:06 +0100
committerOlivier De Cannière <olivier.decanniere@qt.io>2023-02-22 16:21:09 +0100
commita142873d1cc85c5be50b0479063da36c0f10dc66 (patch)
treea57708f79cd6de3ef045a27ce36cd76eed82df8e /tests/auto/qml/qmlcppcodegen/data/variantMapLookup.qml
parent1dad3c22d62e0bbe737a1e76fe44b451ca7f33b3 (diff)
QmlCompiler: Implement get lookup of variantMap properties
This patch adds support for get lookups of QVariantMap properties. Setting or modifying is not supported and will reject. Also, QQmlJSRegisterContent::JavaScriptObjectProperty was renamed to QQmlJSRegisterContent::GenericObjectProperty Tests were added to TestQmllint::cleanQmlCode() and tst_QmlCppCodegen::variantMapLookup(). Pick-to: 6.5 Fixes: QTBUG-105545 Change-Id: I653ee4e7de1fb1514e1e563a92cfc28633268a7e Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Diffstat (limited to 'tests/auto/qml/qmlcppcodegen/data/variantMapLookup.qml')
-rw-r--r--tests/auto/qml/qmlcppcodegen/data/variantMapLookup.qml11
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/auto/qml/qmlcppcodegen/data/variantMapLookup.qml b/tests/auto/qml/qmlcppcodegen/data/variantMapLookup.qml
new file mode 100644
index 0000000000..4e56cb9448
--- /dev/null
+++ b/tests/auto/qml/qmlcppcodegen/data/variantMapLookup.qml
@@ -0,0 +1,11 @@
+pragma Strict
+import TestTypes
+import QtQuick
+
+Item {
+ property int i: moo.data.value
+
+ VariantMapLookupFoo {
+ id: moo
+ }
+}