diff options
author | Thorbjørn Lund Martsum <tmartsum@gmail.com> | 2011-12-15 08:11:16 +0100 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-02-01 16:25:37 +0100 |
commit | 6cab0bed1d9563628423943cbdae97e1703eacf1 (patch) | |
tree | 5f6de6144a5e1567e0dd5ffb65f64c26acf2580f /src/widgets | |
parent | 5caa75f6654d1475dcd2d118e240b683a617d735 (diff) |
QHeaderView - Do not try to remove non-existing section
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>
Diffstat (limited to 'src/widgets')
-rw-r--r-- | src/widgets/itemviews/qheaderview.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/widgets/itemviews/qheaderview.cpp b/src/widgets/itemviews/qheaderview.cpp index 83c4fd0071..33c8da4f69 100644 --- a/src/widgets/itemviews/qheaderview.cpp +++ b/src/widgets/itemviews/qheaderview.cpp @@ -1940,7 +1940,7 @@ void QHeaderView::initializeSections(int start, int end) 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) |