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:
parent
764c4fa8fe
commit
a7b2c43dfb
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user