diff options
author | Stephen Kelly <stephen.kelly@kdab.com> | 2012-10-17 09:20:10 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2012-10-19 00:44:54 +0200 |
commit | ae3ad0ad211e6b9d745193fc049ad6ee07d731f0 (patch) | |
tree | d433aac5c968cce9407cbe733d085a75e0aa8d5a /src/gui/painting/qpagedpaintdevice_p.h | |
parent | d84f449bcde56fd2df12f82dd2ba2e1f0a4ae7c7 (diff) |
Handle the case where persistent indexes have gone invalid.
Don't add invalid ranges to the result. They will be removed
whenever d->ranges is processed for public consumption
anyway. For example, QItemSelectionModel::selection() calls
merge() with another selection. The merge() method removes
invalid ranges already. But the invalid ranges don't need
to be there in the first place, so this patch removes them.
A longer-term goal is to maintain d->ranges as an always-sorted list.
This method can be called with a vector containing invalid
QPersistentModelIndexes when those persistent indexes are made invalid
in between layoutAboutToBeChanged and layoutChanged. It's a normal
thing to happen and a case that should be handled deliberately.
Change-Id: I741ed9208d8a75644975c9e8d61f0d6d78e20576
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Diffstat (limited to 'src/gui/painting/qpagedpaintdevice_p.h')
0 files changed, 0 insertions, 0 deletions