qt6-bb10/tests/auto/widgets/itemviews
Gabriel de Dietrich 8b9346c740 Item Views: Avoid reentrant call in updateEditorGeometries()
This may result in incrementing an invalid iterator after the
iterator's container has changed. Also, for this to happen,
the view needs to have an active editor.

The reentrant call happens as follows in QTreeView, after the
model adds new rows to the view:

    QTreeView::rowsInserted()
    QAbstractItemView::rowsInserted()
    QAbstractItemView::updateEditorGeometries()
    QTreeView::visualRect()
    QAbstractItemViewPrivate::executePostedLayout()
    QTreeView::doItemsLayout()
    QAbstractItemView::doItemsLayout()
    QTreeView::updateGeometries()
    QAbstractItemView::updateGeometries()
    QAbstractItemView::updateEditorGeometries()

Other concrete item view classes may be prone to the same issue.

The fix consists in relayouting the items if needed, which should
trigger calling updateEditorGeometries() again. This doesn't
invalidate previous optimizations regarding item relayouting since
we only force relayouting when it'll be done by visualRect().

Change-Id: Id31507fdc8d9a84d50265298191d690d1a06792b
Task-number: QTBUG-48968
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2015-10-27 11:58:32 +00:00
..
qabstractitemview Item Views: Avoid reentrant call in updateEditorGeometries() 2015-10-27 11:58:32 +00:00
qcolumnview tests/auto/widgets: Replace Q[TRY]_VERIFY(a == b) by Q[TRY]_COMPARE(a, b). 2015-07-31 11:50:10 +00:00
qdatawidgetmapper Update copyright headers 2015-02-11 06:49:51 +00:00
qdirmodel fix usage of wince scope 2015-06-05 10:29:10 +00:00
qfileiconprovider QFileIconEngine: Remove reference to QFileIconProvider 2015-06-30 12:27:04 +00:00
qheaderview QAbstractItemView::sizeHintForRow()/Column: Check for null delegate. 2015-10-19 11:06:22 +00:00
qitemdelegate tests/auto/widgets: Replace Q[TRY]_VERIFY(a == b) by Q[TRY]_COMPARE(a, b). 2015-07-31 11:50:10 +00:00
qitemeditorfactory Update copyright headers 2015-02-11 06:49:51 +00:00
qitemview tests/auto/widgets: Replace Q[TRY]_VERIFY(a == b) by Q[TRY]_COMPARE(a, b). 2015-07-31 11:50:10 +00:00
qlistview Merge remote-tracking branch 'origin/5.5' into 5.6 2015-10-13 23:03:51 +02:00
qlistwidget tests/auto/widgets: Replace Q[TRY]_VERIFY(a == b) by Q[TRY]_COMPARE(a, b). 2015-07-31 11:50:10 +00:00
qtableview Blacklist and skip various tests that are flakey 2015-06-14 10:50:45 +00:00
qtablewidget Fix selected items after sorting in QTableWidget 2015-10-07 18:19:57 +00:00
qtreeview Tests: Harmonize code checking on platform name. 2015-09-24 07:49:30 +00:00
qtreewidget Tests: Harmonize code checking on platform name. 2015-09-24 07:49:30 +00:00
qtreewidgetitemiterator tests/auto/widgets: Replace Q[TRY]_VERIFY(a == b) by Q[TRY]_COMPARE(a, b). 2015-07-31 11:50:10 +00:00
itemviews.pro