qv4engine: Fix assignment of singletons to list properties
We already had support for the various QObject like V4 types in the
engines conversion code (qtObjectFromJS). It was however not used in the
path dealing with arrays.
Thus, when an array containing a singleton was assigned to a list
property, the conversion would have failed, yielding a null entry.
Fix that by using qtObjectFromJS there, too.
Pick-to: 6.12 6.8
Fixes: QTBUG-150990
Change-Id: I2d7437098dff96781de3d1dda04a3e16be6301fe
Reviewed-by: Olivier De Cannière <olivier.decanniere@qt.io>
| commit | 16316f602dad17c8cd149a03bfd524a49353b72e |
| parent | 65c743820a26b83836589ed6c84d1e91f0ab2a2f |
| author | Fabian Kosmale <fabian.kosmale@qt.io> |
| committer | Fabian Kosmale <fabian.kosmale@qt.io> |
| commit time | Mon, 12 Oct 2026 07:29:45 +0000 |
- M src/qml/jsruntime/qv4engine.cpp
- A tests/auto/qml/qqmlecmascript/data/singletonIntoListProperty/MySingleton.qml
- A tests/auto/qml/qqmlecmascript/data/singletonIntoListProperty/compositeSingletonInListProperty.qml
- A tests/auto/qml/qqmlecmascript/data/singletonIntoListProperty/qmldir
- M tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp