summaryrefslogtreecommitdiffstats
path: root/src/widgets/itemviews/qheaderview.cpp
diff options
context:
space:
mode:
authorThorbjørn Lund Martsum <tmartsum@gmail.com>2012-01-22 19:52:58 +0100
committerQt by Nokia <qt-info@nokia.com>2012-01-31 20:01:06 +0100
commitc47b0287498faf33bc7456579bc5fa6d47180114 (patch)
treec0ea96bd623b235185e3f9c9bfede8670a433cf7 /src/widgets/itemviews/qheaderview.cpp
parentc22be731680c8766894419f9c91a659459baadeb (diff)
QHeaderView::setOffsetToSectionPosition documentation update
The documentation has used the word visualIndex for the argument to this function. That is however very misleading since this visualIndex is not the same as 'visualIndex' as we have in visualIndex(int logicalIndex) logicalIndex(int visualIndex) or visualIndexAt(int position) Beside the above a variable name has also been changed from visualIndex to actualVisualIndex. Change-Id: I43808adfd7c287a349474ab1e2656c417c8cf3e9 Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
Diffstat (limited to 'src/widgets/itemviews/qheaderview.cpp')
-rw-r--r--src/widgets/itemviews/qheaderview.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/widgets/itemviews/qheaderview.cpp b/src/widgets/itemviews/qheaderview.cpp
index af83fb90ce..e753f7263d 100644
--- a/src/widgets/itemviews/qheaderview.cpp
+++ b/src/widgets/itemviews/qheaderview.cpp
@@ -481,15 +481,17 @@ void QHeaderView::setOffset(int newOffset)
/*!
\since 4.2
- Sets the offset to the start of the section at the given \a visualIndex.
+ Sets the offset to the start of the section at the given \a visualSectionNumber.
+ \a visualSectionNumber is the actual visible section when hiddenSections are
+ not considered. That is not always the same as \a visualIndex.
\sa setOffset(), sectionPosition()
*/
-void QHeaderView::setOffsetToSectionPosition(int visualIndex)
+void QHeaderView::setOffsetToSectionPosition(int visualSectionNumber)
{
Q_D(QHeaderView);
- if (visualIndex > -1 && visualIndex < d->sectionCount) {
- int position = d->headerSectionPosition(d->adjustedVisualIndex(visualIndex));
+ if (visualSectionNumber > -1 && visualSectionNumber < d->sectionCount) {
+ int position = d->headerSectionPosition(d->adjustedVisualIndex(visualSectionNumber));
setOffset(position);
}
}