Create an invalid QPersistentModelIndex if it will be converted anyway.

Change-Id: I278d4515d74e2213492c443e5a04731b2e79fe1e
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
This commit is contained in:
Stephen Kelly 2012-09-27 17:58:01 +02:00 committed by The Qt Project
parent 764c4fa8fe
commit a7b2c43dfb

View File

@ -1301,7 +1301,7 @@ void QSortFilterProxyModelPrivate::_q_sourceLayoutAboutToBeChanged(const QList<Q
QList<QPersistentModelIndex> parents;
foreach (const QPersistentModelIndex &parent, sourceParents) {
if (!parent.isValid()) {
parents << QModelIndex();
parents << QPersistentModelIndex();
continue;
}
const QModelIndex mappedParent = q->mapFromSource(parent);
@ -1342,7 +1342,7 @@ void QSortFilterProxyModelPrivate::_q_sourceLayoutChanged(const QList<QPersisten
QList<QPersistentModelIndex> parents;
foreach (const QPersistentModelIndex &parent, sourceParents) {
if (!parent.isValid()) {
parents << QModelIndex();
parents << QPersistentModelIndex();
continue;
}
const QModelIndex mappedParent = q->mapFromSource(parent);