Details
-
Bug
-
Resolution: Out of scope
-
P3: Somewhat important
-
4.3.1
-
None
Description
Consider the following example:
QStandardItemModel model(2, 1);
QPersistentModelIndex index = model.index(1, 0, QModelIndex());
model.removeRow(1);
Q_ASSERT(index == QPersistentModelIndex());
The expected result is that the invalidated QPersistentModelIndex is equal to the default constructed QPersistentModelIndex and that the assertion does not occur.
The actual result is that the invalidated QPersistentModelIndex is not equal to the default constructed QPersistentModelIndex, and the assertion occurs.
A default constructed QPersistentModelIndex should be equal to an invalidated QPersistentModelIndex.