summaryrefslogtreecommitdiffstats
path: root/src/gui
diff options
context:
space:
mode:
authorOlivier Goffart <ogoffart@trolltech.com>2009-04-03 11:35:08 (GMT)
committerOlivier Goffart <ogoffart@trolltech.com>2009-04-03 12:07:42 (GMT)
commitf9e0b4e7d57b568ab20b7c77e284f966ff6baf41 (patch)
tree8cd0fdd22c5323ceb66dd06ebafb24d23dd2b85b /src/gui
parentee3ed6a5ae30b8283c9077f0af23863440675a19 (diff)
downloadQt-f9e0b4e7d57b568ab20b7c77e284f966ff6baf41.zip
Qt-f9e0b4e7d57b568ab20b7c77e284f966ff6baf41.tar.gz
Qt-f9e0b4e7d57b568ab20b7c77e284f966ff6baf41.tar.bz2
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
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/itemviews/qtreeview.cpp1
1 files changed, 1 insertions, 0 deletions
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<QTreeView *>(q_func())->executeDelayedItemsLayout();
int x = pos.x();
int column = header->logicalIndexAt(x);
if (column != 0)