summaryrefslogtreecommitdiffstats
path: root/src/gui/itemviews/qheaderview.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/itemviews/qheaderview.cpp')
-rw-r--r--src/gui/itemviews/qheaderview.cpp7
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;
}