Details
-
Bug
-
Resolution: Done
-
P1: Critical
-
5.2.0, 5.3.0 Alpha
-
None
-
212e961fc8abefb23f5de3c6057556caeeacdc30 (qtdeclarative)
Description
The following code causes a crash with Qt 5.2:
import QtQuick 2.0 Item { width: 400; height: 400 ListModel { id: listModel } Component.onCompleted: { // crashes in 5.2 (in 5.1 there is no crash, but also no way to access the sub-elements of 'ids') listModel.append( { description: "fruit", "ids": [ "7937", "1247", "0543"] } ) listModel.append( { description: "veggies", "ids": [ "9378", "2234", "0987" ] } ) } }
As noted in the code, in 5.1 this does not crash, but also does not seem correct – it does not generate any warning/error, but also does not provide any way to access the sub-elements of 'ids' (as far as I know ListModel does not support lists of basic types, but scanning the ListModel/ListElement docs I did not notice this issue being directly addressed).
Attachments
Issue Links
- relates to
-
QTBUG-12117 Add support for JS arrays in ListModel
- Open
For Gerrit Dashboard: QTBUG-35891 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
80934,2 | Fix crash when appending arrays to sub models in list models | stable | qt/qtdeclarative | Status: MERGED | +2 | 0 |