From feed3b7b8077f2c9bba72c49e249fb96c262d72e Mon Sep 17 00:00:00 2001 From: Mitch Curtis Date: Thu, 1 Nov 2018 10:52:32 +0100 Subject: Drawer: fix infinite positioning loop This fixes the issue where Drawer would try to reposition itself forever, but does not address the fact that it is incorrectly positioned afterwards. Task-number: QTBUG-71290 Change-Id: Ibbd4baa84b66ab446ce3af2ef326f8c50e74216d Reviewed-by: Richard Moe Gustavsen --- src/quicktemplates2/qquickdrawer.cpp | 3 +++ src/quicktemplates2/qquickpopuppositioner_p_p.h | 1 - 2 files changed, 3 insertions(+), 1 deletion(-) (limited to 'src/quicktemplates2') diff --git a/src/quicktemplates2/qquickdrawer.cpp b/src/quicktemplates2/qquickdrawer.cpp index 95b27512..9cc38791 100644 --- a/src/quicktemplates2/qquickdrawer.cpp +++ b/src/quicktemplates2/qquickdrawer.cpp @@ -222,6 +222,9 @@ QQuickPopupPositioner *QQuickDrawerPrivate::getPositioner() void QQuickDrawerPositioner::reposition() { + if (m_positioning) + return; + QQuickDrawer *drawer = static_cast(popup()); QQuickWindow *window = drawer->window(); if (!window) diff --git a/src/quicktemplates2/qquickpopuppositioner_p_p.h b/src/quicktemplates2/qquickpopuppositioner_p_p.h index 6eb990a7..64f57a3f 100644 --- a/src/quicktemplates2/qquickpopuppositioner_p_p.h +++ b/src/quicktemplates2/qquickpopuppositioner_p_p.h @@ -73,7 +73,6 @@ protected: void itemParentChanged(QQuickItem *, QQuickItem *parent) override; void itemChildRemoved(QQuickItem *, QQuickItem *child) override; -private: void removeAncestorListeners(QQuickItem *item); void addAncestorListeners(QQuickItem *item); -- cgit v1.2.3