From ab31e883635f4b26a406500787a20ea6d95dc706 Mon Sep 17 00:00:00 2001 From: Nils Jeisecke Date: Fri, 11 Jan 2019 14:01:48 +0100 Subject: Doc: Give a hint to Popup's margins property in the positioning section Change-Id: I6878b06d67b6066da1ca187cd879b77b96539ddc Reviewed-by: Mitch Curtis --- src/quicktemplates2/qquickpopup.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/quicktemplates2') diff --git a/src/quicktemplates2/qquickpopup.cpp b/src/quicktemplates2/qquickpopup.cpp index dcced8dc..e542e7e8 100644 --- a/src/quicktemplates2/qquickpopup.cpp +++ b/src/quicktemplates2/qquickpopup.cpp @@ -212,6 +212,9 @@ QT_BEGIN_NAMESPACE \snippet qtquickcontrols2-popup.qml centerIn + To ensure that the popup is positioned within the bounds of the enclosing + window, the \l margins property can be set to a non-negative value. + \sa {Popup Controls}, {Customizing Popup}, ApplicationWindow */ -- cgit v1.2.3 From fa4b1aa6024f5f3b2d0e0502561b1eaedddd0c78 Mon Sep 17 00:00:00 2001 From: Mitch Curtis Date: Tue, 8 Jan 2019 14:01:13 +0100 Subject: QQuickPopupPositioner: fix crash on application exit Don't add duplicate change listeners, since only one of them will be removed. Coincidentally, this is the same fix as d56c193e, which was reverted for unrelated reasons as part of a bulk revert in d3545dbd. Change-Id: If6fde09f884929c7928f3a1f78625559c9fcbf07 Fixes: QTBUG-72746 Reviewed-by: Richard Moe Gustavsen --- src/quicktemplates2/qquickpopuppositioner.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/quicktemplates2') diff --git a/src/quicktemplates2/qquickpopuppositioner.cpp b/src/quicktemplates2/qquickpopuppositioner.cpp index 69a57674..ebd8ff29 100644 --- a/src/quicktemplates2/qquickpopuppositioner.cpp +++ b/src/quicktemplates2/qquickpopuppositioner.cpp @@ -300,7 +300,7 @@ void QQuickPopupPositioner::addAncestorListeners(QQuickItem *item) QQuickItem *p = item; while (p) { - QQuickItemPrivate::get(p)->addItemChangeListener(this, AncestorChangeTypes); + QQuickItemPrivate::get(p)->updateOrAddItemChangeListener(this, AncestorChangeTypes); p = p->parentItem(); } } -- cgit v1.2.3