From: Alan Alpert Date: Wed, 1 May 2013 23:36:02 +0000 (-0700) Subject: Remove from hover list on destruction X-Git-Tag: upstream/5.2.1~798^2~94 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=03f0c55799e671d8800ef3727f71162766e103d1;p=platform%2Fupstream%2Fqtdeclarative.git 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 --- 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)