diff options
author | J-P Nurmi <jpnurmi@qt.io> | 2016-08-17 18:16:41 +0200 |
---|---|---|
committer | J-P Nurmi <jpnurmi@qt.io> | 2016-08-18 12:01:24 +0000 |
commit | 7c07c60ff17974621fea932a18cc2e652d17ab78 (patch) | |
tree | 3644adcc9cb1f4862a0fc4d9411d38ddb219a83a /src/quicktemplates2/qquickmenu.cpp | |
parent | 1fbc51b4f285692206a4c0cdf132963638919e6e (diff) |
QQuickPopup: don't keep a reference to a destroyed parent
Move the itemDestroyed() listener from QQuickPopupPositioner, which is
only active while the popup is visible, to QQuickPopupPrivate instead.
This way the popup gets a notification when the parent gets destroyed
while the popup is hidden.
Task-number: QTBUG-55347
Change-Id: Ic72206cc05996c23062e814799a030c369fc6288
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Diffstat (limited to 'src/quicktemplates2/qquickmenu.cpp')
-rw-r--r-- | src/quicktemplates2/qquickmenu.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/quicktemplates2/qquickmenu.cpp b/src/quicktemplates2/qquickmenu.cpp index f4fb26e7..bc594c03 100644 --- a/src/quicktemplates2/qquickmenu.cpp +++ b/src/quicktemplates2/qquickmenu.cpp @@ -196,6 +196,7 @@ void QQuickMenuPrivate::itemSiblingOrderChanged(QQuickItem *) void QQuickMenuPrivate::itemDestroyed(QQuickItem *item) { + QQuickPopupPrivate::itemDestroyed(item); int index = contentModel->indexOf(item, nullptr); if (index != -1) removeItem(index, item); |