summaryrefslogtreecommitdiffstats
path: root/src/gui/painting/qpainter.h
diff options
context:
space:
mode:
authorStephen Kelly <stephen.kelly@kdab.com>2012-10-17 09:20:10 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2012-10-19 00:44:54 +0200
commitae3ad0ad211e6b9d745193fc049ad6ee07d731f0 (patch)
treed433aac5c968cce9407cbe733d085a75e0aa8d5a /src/gui/painting/qpainter.h
parentd84f449bcde56fd2df12f82dd2ba2e1f0a4ae7c7 (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/qpainter.h')
0 files changed, 0 insertions, 0 deletions