Details
-
Bug
-
Resolution: Done
-
P2: Important
-
5.3.0
-
None
-
ALL
-
qtdeclarative#stable: 0306626a4deb8c36b219ba08a68248d3a454b697
Description
According to the document of QAbstractItemModel , the rowsAboutToBeRemoved should be emitted before the rows are actually removed. Therefore , the rows should be still accessible.
However, I found that the implementation of ListModel (QQmlListModel) does not follow the rule. The rows are already removed when you got the rowsAboutToBeRemoved signal.
The expected program flow:
QQmlListModel::remove()
--> emit rowsAboutToBeRemoved
--> remove the data
--> emit rowsRemoved
The actual program flow
QQmlListModel::remove()
--> remove the data
--> emit rowsAboutToBeRemoved
--> emit rowsRemoved
There has same problem for rowsAboutToBeInserted and rowsAboutToBeMoved.
Attachments
Issue Links
- relates to
-
QTBUG-39321 ListModel with WorkerScript: rowsAboutToBeXxx is emitted after the change
- Open