When a new source model is applied to a proxy model, any persistent child indexes of a hierarchical model do not seem to be properly invalidated. They still refer to the original model.
If a custom model is being implemented, the index method is then given a parent index that is not of the correct model.
This can be illustrated by overriding QStandardItemModel::index and adding an assert.
|For Gerrit Dashboard: QTBUG-44962|
|211070,4||QSortFilterProxyModel: Clear persistent indexes on source model change||dev||qt/qtbase||Status: MERGED||+2||0|
|230462,2||QSortFilterProxyModel: don't assert when old model gets destroyed||5.11||qt/qtbase||Status: MERGED||+2||0|
|230766,1||QSortFilterProxyModel: don't assert when old model gets destroyed||dev||qt/qtbase||Status: ABANDONED||0||0|