diff options
author | Thierry Bastian <thierry.bastian@nokia.com> | 2009-06-10 13:31:43 (GMT) |
---|---|---|
committer | Thierry Bastian <thierry.bastian@nokia.com> | 2009-06-10 15:02:55 (GMT) |
commit | 4a8a851315ba10824ac107084ccff9de649418ea (patch) | |
tree | aa5c2696f6a3a5a8dd0e74b57c04003769f10455 /src/gui/itemviews/qheaderview.cpp | |
parent | 747444c6776d948dad479e7b6f3564d0515d4e52 (diff) | |
download | Qt-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/qheaderview.cpp')
-rw-r--r-- | src/gui/itemviews/qheaderview.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/gui/itemviews/qheaderview.cpp b/src/gui/itemviews/qheaderview.cpp index 7ad825a..d0321d8 100644 --- a/src/gui/itemviews/qheaderview.cpp +++ b/src/gui/itemviews/qheaderview.cpp @@ -3474,11 +3474,10 @@ void QHeaderViewPrivate::setGlobalHeaderResizeMode(QHeaderView::ResizeMode mode) int QHeaderViewPrivate::viewSectionSizeHint(int logical) const { - Q_Q(const QHeaderView); - if (QAbstractItemView *parent = qobject_cast<QAbstractItemView*>(q->parent())) { + if (QAbstractItemView *view = qobject_cast<QAbstractItemView*>(parent)) { return (orientation == Qt::Horizontal - ? parent->sizeHintForColumn(logical) - : parent->sizeHintForRow(logical)); + ? view->sizeHintForColumn(logical) + : view->sizeHintForRow(logical)); } return 0; } |