summaryrefslogtreecommitdiffstats
path: root/src/corelib/itemmodels
diff options
context:
space:
mode:
authorQt Forward Merge Bot <qt_forward_merge_bot@qt-project.org>2018-05-29 01:00:09 +0200
committerQt Forward Merge Bot <qt_forward_merge_bot@qt-project.org>2018-05-29 01:00:09 +0200
commit875731368af013568bb24a6cda7a2836c723dc82 (patch)
tree993d494f25151c1290ea9809e978a096b7431f9b /src/corelib/itemmodels
parent2843c58e5f0447e553d0f29614177b3b1d1884dc (diff)
parent42e4a6531d89601499e5d3d419216a4bbacf6670 (diff)
Merge remote-tracking branch 'origin/5.11' into dev
Diffstat (limited to 'src/corelib/itemmodels')
-rw-r--r--src/corelib/itemmodels/qsortfilterproxymodel.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/corelib/itemmodels/qsortfilterproxymodel.cpp b/src/corelib/itemmodels/qsortfilterproxymodel.cpp
index 0025c60c3b..8312318e4c 100644
--- a/src/corelib/itemmodels/qsortfilterproxymodel.cpp
+++ b/src/corelib/itemmodels/qsortfilterproxymodel.cpp
@@ -1923,7 +1923,10 @@ void QSortFilterProxyModel::setSourceModel(QAbstractItemModel *sourceModel)
disconnect(d->model, SIGNAL(modelAboutToBeReset()), this, SLOT(_q_sourceAboutToBeReset()));
disconnect(d->model, SIGNAL(modelReset()), this, SLOT(_q_sourceReset()));
- d->_q_sourceModelDestroyed();
+ // same as in _q_sourceReset()
+ d->invalidatePersistentIndexes();
+ d->_q_clearMapping();
+
QAbstractProxyModel::setSourceModel(sourceModel);
connect(d->model, SIGNAL(dataChanged(QModelIndex,QModelIndex,QVector<int>)),