From 5b3872b2d7523d44ba454a76613e7a3fa45387f7 Mon Sep 17 00:00:00 2001 From: Thierry Bastian Date: Mon, 11 Apr 2011 16:52:59 +0200 Subject: Fixed a crash in QListView The problem was that QAbstractScrollArea calls layoutChildren on resize but the QListView requires that updateGeometries is called before. Task: QTBUG-18558 Reviewed-By: Pierre --- src/gui/itemviews/qabstractitemview.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gui/itemviews/qabstractitemview.cpp b/src/gui/itemviews/qabstractitemview.cpp index 081a6d9..5142107 100644 --- a/src/gui/itemviews/qabstractitemview.cpp +++ b/src/gui/itemviews/qabstractitemview.cpp @@ -1542,6 +1542,7 @@ bool QAbstractItemView::event(QEvent *event) break; case QEvent::LayoutDirectionChange: case QEvent::ApplicationLayoutDirectionChange: + case QEvent::Resize: updateGeometries(); break; case QEvent::StyleChange: @@ -2396,7 +2397,6 @@ void QAbstractItemView::keyPressEvent(QKeyEvent *event) void QAbstractItemView::resizeEvent(QResizeEvent *event) { QAbstractScrollArea::resizeEvent(event); - updateGeometries(); } /*! -- cgit v0.12