Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
|
#include <qabstractitemmodel_p.h>
Public Member Functions | |
Persistent () | |
void | insertMultiAtEnd (const QModelIndex &key, QPersistentModelIndexData *data) |
Public Attributes | |
QMultiHash< QtPrivate::QModelIndexWrapper, QPersistentModelIndexData * > | indexes |
QStack< QList< QPersistentModelIndexData * > > | moved |
QStack< QList< QPersistentModelIndexData * > > | invalidated |
Definition at line 132 of file qabstractitemmodel_p.h.
|
inline |
Definition at line 133 of file qabstractitemmodel_p.h.
void QAbstractItemModelPrivate::Persistent::insertMultiAtEnd | ( | const QModelIndex & | key, |
QPersistentModelIndexData * | data ) |
QMultiHash::insert inserts the value before the old value. and find() return the new value. We need insertMultiAtEnd because we don't want to overwrite the old one, which should be removed later
There should be only one instance QPersistentModelIndexData per index, but in some intermediate state there may be severals of PersistantModelIndex pointing to the same index, but one is already updated, and the other one is not. This make sure than when updating the first one we don't overwrite the second one in the hash, and the second one will be updated right later.
Definition at line 4178 of file qabstractitemmodel.cpp.
QMultiHash<QtPrivate::QModelIndexWrapper, QPersistentModelIndexData *> QAbstractItemModelPrivate::Persistent::indexes |
Definition at line 134 of file qabstractitemmodel_p.h.
QStack<QList<QPersistentModelIndexData *> > QAbstractItemModelPrivate::Persistent::invalidated |
Definition at line 136 of file qabstractitemmodel_p.h.
QStack<QList<QPersistentModelIndexData *> > QAbstractItemModelPrivate::Persistent::moved |
Definition at line 135 of file qabstractitemmodel_p.h.