From 03f0c55799e671d8800ef3727f71162766e103d1 Mon Sep 17 00:00:00 2001 From: Alan Alpert Date: Wed, 1 May 2013 16:36:02 -0700 Subject: [PATCH] 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 Reviewed-by: Liang Qi --- src/quick/items/qquickitem.cpp | 3 +-- 1 files changed, 1 insertions(+), 2 deletions(-) diff --git a/src/quick/items/qquickitem.cpp b/src/quick/items/qquickitem.cpp index 111e74e..733e26a 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) -- 1.7.2.5