diff options
author | Ulf Hermann <ulf.hermann@qt.io> | 2021-03-15 11:02:54 +0100 |
---|---|---|
committer | Ulf Hermann <ulf.hermann@qt.io> | 2021-03-17 21:38:35 +0100 |
commit | e5dcaede9a7c7955be74d68e31eb7537a2432c69 (patch) | |
tree | 41ca09f5405c7d0750ce63b9133a7ad2f35b77d4 /tests/auto/qml/qqmllistreference/data/AListItem.qml | |
parent | ca06d488f3c5d899c008b431f6939793813243cb (diff) |
QQmlListReference: Calculate element metatype lazily
The calculation is expensive and only needed when inserting elements.
Realize that QQmlMetaType::listType() can never return -1 and remove the
respective early abort conditions. Furthermore, guard against nullptr
element types when inserting. Those would otherwise crash in
canConvert().
Change-Id: Ifaa9d7df1bf8ac372074d25554ec02944d3e3bff
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Diffstat (limited to 'tests/auto/qml/qqmllistreference/data/AListItem.qml')
-rw-r--r-- | tests/auto/qml/qqmllistreference/data/AListItem.qml | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/auto/qml/qqmllistreference/data/AListItem.qml b/tests/auto/qml/qqmllistreference/data/AListItem.qml new file mode 100644 index 0000000000..016d7198f1 --- /dev/null +++ b/tests/auto/qml/qqmllistreference/data/AListItem.qml @@ -0,0 +1,5 @@ +import QtQml + +QtObject { + property int foo: 12 +} |