aboutsummaryrefslogtreecommitdiffstats
path: root/src/templates
diff options
context:
space:
mode:
authorJ-P Nurmi <jpnurmi@theqtcompany.com>2016-03-10 11:02:40 +0100
committerJ-P Nurmi <jpnurmi@theqtcompany.com>2016-03-10 11:21:40 +0000
commit2e79c79bed863b5abc3ce55a4552fd9d32a7d83a (patch)
tree0d1791abd9a2f9e550fd33fb6137fdfdad193d6a /src/templates
parent0db2cfec92483e8f765384eac3ff14f6f197d248 (diff)
QQuickPopup: fix possible referencing of a destroyed parent item
The internal popup positioner is already listening for itemDestroyed() of the parent item, so it may as well reset the parent item pointer of the popup to avoid having the popup referencing a destroyed parent in complex tooltip auto test cases coming up in 5.7. Change-Id: I463403e528c33285ea7d51b68d0f5020a239e98e Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
Diffstat (limited to 'src/templates')
-rw-r--r--src/templates/qquickpopup.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/templates/qquickpopup.cpp b/src/templates/qquickpopup.cpp
index 0285d381..4fbcb069 100644
--- a/src/templates/qquickpopup.cpp
+++ b/src/templates/qquickpopup.cpp
@@ -469,6 +469,7 @@ void QQuickPopupPositioner::itemDestroyed(QQuickItem *item)
Q_ASSERT(m_parentItem == item);
m_parentItem = Q_NULLPTR;
+ m_popup->parentItem = Q_NULLPTR;
QQuickItemPrivate::get(item)->removeItemChangeListener(this, ItemChangeTypes);
removeAncestorListeners(item->parentItem());
}