Commit Graph

2 Commits

Author SHA1 Message Date
Ulf Hermann f2431370ad QML: Allow conversion between different list types
We universally allow this pretty much everywhere else. We should also
allow it when evaluating bindings. To facilitate this, generalize the
SequencePrototype::toVariant() method so that it works with any
array-like and faithfully coerces the elements by the type coercion
rules.

Pick-to: 6.8
Fixes: QTBUG-126398
Change-Id: I520cd40e5f74bee5ac4b418aa86dc043774efcbe
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2024-07-03 16:36:49 +02:00
Ulf Hermann 3d3ff946e3 QmlCompiler: Don't generate invalid code for unstorable lists
When printing a sequence type through one of the console methods, we
have to consider the adjusted type, not only the one we intended to
read.

Amends commit 7894f271ab.

Pick-to: 6.8
Task-number: QTBUG-126398
Change-Id: I4606ed2006a547bdf93ec136ebbfab10b706b917
Reviewed-by: Olivier De Cannière <olivier.decanniere@qt.io>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2024-06-28 18:16:48 +02:00