diff options
| author | Olivier De Cannière <olivier.decanniere@qt.io> | 2024-02-07 10:11:41 +0100 |
|---|---|---|
| committer | Olivier De Cannière <olivier.decanniere@qt.io> | 2024-02-07 17:23:01 +0100 |
| commit | 72308ce2076aef3b663aa769e32e71d4b0bf645c (patch) | |
| tree | 5a9caca89c5179a8d03734fdc48465b85f5930b8 /tests/auto/qml/qmlcppcodegen/data | |
| parent | bf7ed10ce1ed31e24a35bc786424656308c91256 (diff) | |
Compiler: Convert from stored to original type when generating equality
Pick-to: 6.7
Fixes: QTBUG-121909
Change-Id: I913f59324364052d7893d4c4072f92fcf418a388
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Diffstat (limited to 'tests/auto/qml/qmlcppcodegen/data')
| -rw-r--r-- | tests/auto/qml/qmlcppcodegen/data/CMakeLists.txt | 1 | ||||
| -rw-r--r-- | tests/auto/qml/qmlcppcodegen/data/shadowedPrimitiveCmpEqNull.qml | 16 |
2 files changed, 17 insertions, 0 deletions
diff --git a/tests/auto/qml/qmlcppcodegen/data/CMakeLists.txt b/tests/auto/qml/qmlcppcodegen/data/CMakeLists.txt index b896de4a1f..7263766b5d 100644 --- a/tests/auto/qml/qmlcppcodegen/data/CMakeLists.txt +++ b/tests/auto/qml/qmlcppcodegen/data/CMakeLists.txt @@ -235,6 +235,7 @@ set(qml_files setLookupConversion.qml shadowedAsCasts.qml shadowedMethod.qml + shadowedPrimitiveCmpEqNull.qml shared/Slider.qml shifts.qml signal.qml diff --git a/tests/auto/qml/qmlcppcodegen/data/shadowedPrimitiveCmpEqNull.qml b/tests/auto/qml/qmlcppcodegen/data/shadowedPrimitiveCmpEqNull.qml new file mode 100644 index 0000000000..0e130b9afc --- /dev/null +++ b/tests/auto/qml/qmlcppcodegen/data/shadowedPrimitiveCmpEqNull.qml @@ -0,0 +1,16 @@ +import QtQuick + +QtObject { + id: win + + component Foo: QtObject { + property int progress: 0 + } + + property int progress: 0 + readonly property Foo configuring: Foo {} + + Component.onCompleted: { + win.configuring.progress = win?.progress ?? 0 + } +} |
