diff options
author | Ulf Hermann <ulf.hermann@qt.io> | 2023-05-09 10:47:06 +0200 |
---|---|---|
committer | Ulf Hermann <ulf.hermann@qt.io> | 2023-05-10 09:28:59 +0200 |
commit | 60a34c33934e264e42d7aef00500f5ebf7f03bff (patch) | |
tree | fd4a7f9a0d8f785333d111c11c5d767ed4a01c74 /tests/auto | |
parent | 2f5d8a629657ea5a69c7d1d1e86972f73049b011 (diff) | |
download | qtdeclarative-60a34c33934e264e42d7aef00500f5ebf7f03bff.tar.gz |
QmlCompiler: Optimize list manipulations
We should never store a list in a wrapper type that is itself a
different list. Wrapping and unwrapping requires rebuilding the list in
such cases. We can, however, store lists of builtins as-is. There is no
need to transform them. Other lists can still be stored in QVariant.
As a result, we now need to discern between the access semantics of the
stored type and the access semantics of the contained type. They are not
guaranteed to be the same anymore. Furthermore, we need to reject
"internal" manipulation of QVariant-wrapped lists for now. We might
implement them using QMetaSequence, though.
Task-number: QTBUG-113465
Change-Id: If09ea345b2fac39bf2abd62a2fce2d354df85b6b
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Diffstat (limited to 'tests/auto')
-rw-r--r-- | tests/auto/qml/qmlcppcodegen/data/failures.qml | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/auto/qml/qmlcppcodegen/data/failures.qml b/tests/auto/qml/qmlcppcodegen/data/failures.qml index b19b7f9ea2..e6f3af5e87 100644 --- a/tests/auto/qml/qmlcppcodegen/data/failures.qml +++ b/tests/auto/qml/qmlcppcodegen/data/failures.qml @@ -82,4 +82,9 @@ QtObject { } return a; } + + // TODO: Drop these once we can manipulate QVariant-wrapped lists. + property list<withLength> withLengths + property int l: withLengths.length + property withLength w: withLengths[10] } |