From f9e0b4e7d57b568ab20b7c77e284f966ff6baf41 Mon Sep 17 00:00:00 2001 From: Olivier Goffart Date: Fri, 3 Apr 2009 13:35:08 +0200 Subject: Fixes crash in QTreeView with QSortFilterProxyModel If we get an hover event while the model gets invalidated, we might ends up calling itemDecorationAt before the viewitem is refreshed. Can be reproduced in KTorrent (Relates to KDE bug 172198) or Kopete trunk Reviewed-by: Thierry --- src/gui/itemviews/qtreeview.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/gui/itemviews/qtreeview.cpp b/src/gui/itemviews/qtreeview.cpp index 2aa0c57..0117db2 100644 --- a/src/gui/itemviews/qtreeview.cpp +++ b/src/gui/itemviews/qtreeview.cpp @@ -3507,6 +3507,7 @@ void QTreeViewPrivate::updateScrollBars() int QTreeViewPrivate::itemDecorationAt(const QPoint &pos) const { + const_cast(q_func())->executeDelayedItemsLayout(); int x = pos.x(); int column = header->logicalIndexAt(x); if (column != 0) -- cgit v0.12