summaryrefslogtreecommitdiffstats
path: root/src/gui/itemviews/qlistview.cpp
diff options
context:
space:
mode:
authorThierry Bastian <thierry.bastian@nokia.com>2009-06-10 13:31:43 (GMT)
committerThierry Bastian <thierry.bastian@nokia.com>2009-06-10 15:02:55 (GMT)
commit4a8a851315ba10824ac107084ccff9de649418ea (patch)
treeaa5c2696f6a3a5a8dd0e74b57c04003769f10455 /src/gui/itemviews/qlistview.cpp
parent747444c6776d948dad479e7b6f3564d0515d4e52 (diff)
downloadQt-4a8a851315ba10824ac107084ccff9de649418ea.zip
Qt-4a8a851315ba10824ac107084ccff9de649418ea.tar.gz
Qt-4a8a851315ba10824ac107084ccff9de649418ea.tar.bz2
removed superflous indirection (ie. using q->..) instead of using the
private class member.
Diffstat (limited to 'src/gui/itemviews/qlistview.cpp')
-rw-r--r--src/gui/itemviews/qlistview.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/gui/itemviews/qlistview.cpp b/src/gui/itemviews/qlistview.cpp
index 03ba641..fe7916c 100644
--- a/src/gui/itemviews/qlistview.cpp
+++ b/src/gui/itemviews/qlistview.cpp
@@ -610,7 +610,7 @@ int QListViewPrivate::horizontalScrollToValue(const QModelIndex &index, const QR
const bool rightOf = q->isRightToLeft()
? rect.right() > area.right()
: (rect.right() > area.right()) && (rect.left() > area.left());
- int horizontalValue = q->horizontalScrollBar()->value();
+ int horizontalValue = hbar->value();
// ScrollPerItem
if (q->horizontalScrollMode() == QAbstractItemView::ScrollPerItem && viewMode == QListView::ListMode) {
@@ -652,10 +652,10 @@ int QListViewPrivate::verticalScrollToValue(const QModelIndex &index, const QRec
const bool above = (hint == QListView::EnsureVisible && rect.top() < area.top());
const bool below = (hint == QListView::EnsureVisible && rect.bottom() > area.bottom());
- int verticalValue = q->verticalScrollBar()->value();
+ int verticalValue = vbar->value();
// ScrollPerItem
- if (q->verticalScrollMode() == QAbstractItemView::ScrollPerItem && viewMode == QListView::ListMode) {
+ if (verticalScrollMode == QAbstractItemView::ScrollPerItem && viewMode == QListView::ListMode) {
const QListViewItem item = indexToListViewItem(index);
const QRect rect = q->visualRect(index);
verticalValue = staticListView->verticalPerItemValue(itemIndex(item),
@@ -1972,10 +1972,10 @@ void QListViewPrivate::prepareItemsLayout()
// Qt::ScrollBarAlwaysOn but scrollbar extent must be deduced if policy
// is Qt::ScrollBarAsNeeded
int verticalMargin = vbarpolicy==Qt::ScrollBarAsNeeded
- ? q->style()->pixelMetric(QStyle::PM_ScrollBarExtent, 0, q->verticalScrollBar()) + frameAroundContents
+ ? q->style()->pixelMetric(QStyle::PM_ScrollBarExtent, 0, vbar) + frameAroundContents
: 0;
int horizontalMargin = hbarpolicy==Qt::ScrollBarAsNeeded
- ? q->style()->pixelMetric(QStyle::PM_ScrollBarExtent, 0, q->horizontalScrollBar()) + frameAroundContents
+ ? q->style()->pixelMetric(QStyle::PM_ScrollBarExtent, 0, hbar) + frameAroundContents
: 0;
layoutBounds.adjust(0, 0, -verticalMargin, -horizontalMargin);