aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/items/qquickitem.cpp
diff options
context:
space:
mode:
authorAlan Alpert <aalpert@blackberry.com>2013-05-01 16:36:02 -0700
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-05-03 13:02:31 +0200
commit03f0c55799e671d8800ef3727f71162766e103d1 (patch)
treeff10386f59e91533a278faabff6513b81c7f1dfa /src/quick/items/qquickitem.cpp
parent329a3462903c60876be3449c82d0bc16b72bf402 (diff)
Remove from hover list on destruction
When hoverEnabled is unset the item remains in a hovered state until the mouse leaves. In this circumstance, the item could be destroyed without cleaning up the reference in the hovered items list. To catch this and similar circumstances, the item is removed from the list when destroyed, regardless of hoverEnabled status. Task-number: QTBUG-30962 Change-Id: I982ab8c9e1077fecc885fd166d70bbbbbe8fc179 Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com> Reviewed-by: Liang Qi <liang.qi@digia.com>
Diffstat (limited to 'src/quick/items/qquickitem.cpp')
-rw-r--r--src/quick/items/qquickitem.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/quick/items/qquickitem.cpp b/src/quick/items/qquickitem.cpp
index 111e74eeff..733e26a3b6 100644
--- a/src/quick/items/qquickitem.cpp
+++ b/src/quick/items/qquickitem.cpp
@@ -2506,8 +2506,7 @@ void QQuickItemPrivate::derefWindow()
if (c->cursorItem == q)
c->cursorItem = 0;
#endif
- if ( hoverEnabled )
- c->hoverItems.removeAll(q);
+ c->hoverItems.removeAll(q);
if (itemNodeInstance)
c->cleanup(itemNodeInstance);
if (!parentItem)