diff options
author | Liang Qi <liang.qi@theqtcompany.com> | 2015-10-23 14:01:35 +0200 |
---|---|---|
committer | Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com> | 2015-10-23 14:45:03 +0200 |
commit | 790aef362fd195adf97d8c780a7cbbbade27d51f (patch) | |
tree | 8be464687ab21806cfe9f7ada27098b563aa41b2 /src/widgets/itemviews | |
parent | 9720efbd1035c2e939b0581163e6d804c713dd96 (diff) | |
parent | 07475c662eb73c833da2d461b8ef2702ca1e2cfb (diff) |
Merge remote-tracking branch 'origin/5.6' into dev
Conflicts:
.qmake.conf
configure
src/corelib/global/qglobal.h
src/tools/qdoc/node.cpp
src/tools/qdoc/qdocdatabase.cpp
tests/auto/corelib/io/qsettings/tst_qsettings.cpp
tools/configure/configureapp.cpp
Change-Id: I66028ae5e441a06b73ee85ba72a03a3af3e8593f
Diffstat (limited to 'src/widgets/itemviews')
-rw-r--r-- | src/widgets/itemviews/qabstractitemview.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/widgets/itemviews/qabstractitemview.cpp b/src/widgets/itemviews/qabstractitemview.cpp index c5601b63b2..3bb4d0624f 100644 --- a/src/widgets/itemviews/qabstractitemview.cpp +++ b/src/widgets/itemviews/qabstractitemview.cpp @@ -3020,8 +3020,8 @@ int QAbstractItemView::sizeHintForRow(int row) const const QModelIndex index = d->model->index(row, c, d->root); if (QWidget *editor = d->editorForIndex(index).widget.data()) height = qMax(height, editor->height()); - int hint = d->delegateForIndex(index)->sizeHint(option, index).height(); - height = qMax(height, hint); + if (const QAbstractItemDelegate *delegate = d->delegateForIndex(index)) + height = qMax(height, delegate->sizeHint(option, index).height()); } return height; } @@ -3050,8 +3050,8 @@ int QAbstractItemView::sizeHintForColumn(int column) const const QModelIndex index = d->model->index(r, column, d->root); if (QWidget *editor = d->editorForIndex(index).widget.data()) width = qMax(width, editor->sizeHint().width()); - int hint = d->delegateForIndex(index)->sizeHint(option, index).width(); - width = qMax(width, hint); + if (const QAbstractItemDelegate *delegate = d->delegateForIndex(index)) + width = qMax(width, delegate->sizeHint(option, index).width()); } return width; } |