Fix hover handling in QTreeView
authorMiikka Heikkinen <miikka.heikkinen@digia.com>
Thu, 20 Sep 2012 09:28:58 +0000 (12:28 +0300)
committerThe Qt Project <gerrit-noreply@qt-project.org>
Mon, 24 Sep 2012 16:01:10 +0000 (18:01 +0200)
commitfd6a870136ab2fdb3ce8b516abcf8c05d45caba7
treed0bb456234d8dfa064fa859640f517d482ad054c
parent05aa8c6c12509cce87d1a3811c5ea1dd83fa0898
Fix hover handling in QTreeView

Cached hoverBranch could get invalid if branches were collapsed or
expanded programmatically, leading to a crash in some situations.

Fixed the logic for updating hovered over branch indicators and
also now update hoverBranch when drawing so that it is guaranteed to be
up to date there - this fixes issues like hover indicator not updating
when the view is programmatically scrolled.

Task-number: QTBUG-27158
Change-Id: I5bd1ad76aee512ad78df33959a84ead16886a47c
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
src/widgets/itemviews/qtreeview.cpp
src/widgets/itemviews/qtreeview_p.h