diff options
author | Liang Qi <liang.qi@qt.io> | 2017-03-02 09:05:12 +0100 |
---|---|---|
committer | Liang Qi <liang.qi@qt.io> | 2017-03-02 09:05:12 +0100 |
commit | 78dd18a0cd18449e1289e428ea6eca65e28fb114 (patch) | |
tree | bbb442c218d1504adb70d49ae67ac78a9c2c42bd /src/quick/items/qquickitem.cpp | |
parent | 015dff255ff0f40c553b1dee43c6cff013df64eb (diff) | |
parent | 8c864e52369ee4d55a1d9345215c8153144b5939 (diff) |
Merge remote-tracking branch 'origin/5.9' into dev
Change-Id: I6cbd83b61fac34c2ba6936711289ec09a490719a
Diffstat (limited to 'src/quick/items/qquickitem.cpp')
-rw-r--r-- | src/quick/items/qquickitem.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/quick/items/qquickitem.cpp b/src/quick/items/qquickitem.cpp index 22ee3f39e4..aa2662489d 100644 --- a/src/quick/items/qquickitem.cpp +++ b/src/quick/items/qquickitem.cpp @@ -2911,14 +2911,15 @@ void QQuickItemPrivate::addChild(QQuickItem *child) childItems.append(child); -#if QT_CONFIG(cursor) QQuickItemPrivate *childPrivate = QQuickItemPrivate::get(child); +#if QT_CONFIG(cursor) // if the added child has a cursor and we do not currently have any children // with cursors, bubble the notification up if (childPrivate->subtreeCursorEnabled && !subtreeCursorEnabled) setHasCursorInChild(true); #endif + if (childPrivate->subtreeHoverEnabled && !subtreeHoverEnabled) setHasHoverInChild(true); @@ -2939,13 +2940,14 @@ void QQuickItemPrivate::removeChild(QQuickItem *child) childItems.removeOne(child); Q_ASSERT(!childItems.contains(child)); -#if QT_CONFIG(cursor) QQuickItemPrivate *childPrivate = QQuickItemPrivate::get(child); +#if QT_CONFIG(cursor) // turn it off, if nothing else is using it if (childPrivate->subtreeCursorEnabled && subtreeCursorEnabled) setHasCursorInChild(false); #endif + if (childPrivate->subtreeHoverEnabled && subtreeHoverEnabled) setHasHoverInChild(false); @@ -3807,10 +3809,10 @@ QQuickItem::UpdatePaintNodeData::UpdatePaintNodeData() /*! This function is called when an item should release graphics - resources which are not already managed by the nodes returend from + resources which are not already managed by the nodes returned from QQuickItem::updatePaintNode(). - This happens when the item is about to be removed from window it + This happens when the item is about to be removed from the window it was previously rendering to. The item is guaranteed to have a \l {QQuickItem::window()}{window} when the function is called. |