diff options
| author | Ulf Hermann <ulf.hermann@qt.io> | 2025-10-06 10:09:01 +0200 |
|---|---|---|
| committer | Ulf Hermann <ulf.hermann@qt.io> | 2025-10-07 07:41:21 +0200 |
| commit | f5e34266ea15c6e44e9816f01f4e627d5f038f0c (patch) | |
| tree | 4e898b2d1f37f8c19602ed6e4381bb6b30989121 /tests/auto/qml/qmlcppcodegen/data/variantMapLookup.qml | |
| parent | ba56f1e4638f9752903d587129b0474e845ce416 (diff) | |
QmlCompiler: Fix write access to QVariantMap
Without this, it tries to resolve the metaObject of QVariantMap, which
crashes.
Amends commit cca07aa78841f2d743f0b4d933abb0dd66f0b948.
Fixes: QTBUG-139626
Pick-to: 6.10 6.8
Change-Id: Id747429ed0d558932b9a6cb8f59e3740982efb56
Reviewed-by: Olivier De Cannière <olivier.decanniere@qt.io>
Diffstat (limited to 'tests/auto/qml/qmlcppcodegen/data/variantMapLookup.qml')
| -rw-r--r-- | tests/auto/qml/qmlcppcodegen/data/variantMapLookup.qml | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/auto/qml/qmlcppcodegen/data/variantMapLookup.qml b/tests/auto/qml/qmlcppcodegen/data/variantMapLookup.qml index 45cb0edd69..75b4fd0fda 100644 --- a/tests/auto/qml/qmlcppcodegen/data/variantMapLookup.qml +++ b/tests/auto/qml/qmlcppcodegen/data/variantMapLookup.qml @@ -3,10 +3,28 @@ import TestTypes import QtQuick Item { + id: root property int i: moo.data.value property int j: moo.many[1].value + property string foo: moo.data.foo VariantMapLookupFoo { id: moo + data: { + let result = { value: 42 }; + switch(root.visible) { + case true: + result.foo = "blue"; + break; + case false: + result.foo = "green"; + break; + } + return result; + } + } + + function doI() { + moo.data.value = i + 1 } } |
