The end parameter passed to removeSectionsFromSpans is off by one.
removeSectionsFromSpans can currently handle/ignore it, but it is
still wrong.
Change-Id: I9148bd106504a37a5c8fd72928ab84c669eebcdb
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
if (end + 1 < d->sectionCount) {
int newCount = end + 1;
- d->removeSectionsFromSpans(newCount, d->sectionCount);
+ d->removeSectionsFromSpans(newCount, d->sectionCount - 1);
if (!d->hiddenSectionSize.isEmpty()) {
if (d->sectionCount - newCount > d->hiddenSectionSize.count()) {
for (int i = end + 1; i < d->sectionCount; ++i)