qt5base-lts/tests/auto/widgets
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
..
dialogs Improve messages in tst_qdir/tst_fileinfo/tst_qfiledialog2. 2015-09-30 17:27:58 +00:00
effects tests/auto/widgets: Replace Q[TRY]_VERIFY(a == b) by Q[TRY]_COMPARE(a, b). 2015-07-31 11:50:10 +00:00
gestures Merge remote-tracking branch 'origin/5.5' into dev 2015-07-01 11:05:26 +02:00
graphicsview Tests: Harmonize code checking on platform name. 2015-09-24 07:49:30 +00:00
itemviews Item Views: Avoid reentrant call in updateEditorGeometries() 2015-10-27 11:58:32 +00:00
kernel xcb: Add support for Qt::WA_ShowWithoutActivating 2015-10-08 07:11:06 +00:00
styles tests/auto/widgets: Replace Q[TRY]_VERIFY(a == b) by Q[TRY]_COMPARE(a, b). 2015-07-31 11:50:10 +00:00
util Merge remote-tracking branch 'origin/5.5' into 5.6 2015-10-02 16:59:55 +02:00
widgets Merge remote-tracking branch 'origin/5.5' into 5.6 2015-10-23 23:14:22 +02:00
widgets.pro Add autotest for QGestureRecognizer. 2014-10-23 21:11:28 +02:00