diff options
author | Mitch Curtis <mitch.curtis@qt.io> | 2018-11-01 10:52:32 +0100 |
---|---|---|
committer | Mitch Curtis <mitch.curtis@qt.io> | 2019-02-22 09:19:46 +0000 |
commit | feed3b7b8077f2c9bba72c49e249fb96c262d72e (patch) | |
tree | fb8f745bfb17efbcfaf83b6f40c8f5e689008c2e /src | |
parent | 16836da1ae44c11317b9861764ea55cce39eac02 (diff) |
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 <richard.gustavsen@qt.io>
Diffstat (limited to 'src')
-rw-r--r-- | src/quicktemplates2/qquickdrawer.cpp | 3 | ||||
-rw-r--r-- | src/quicktemplates2/qquickpopuppositioner_p_p.h | 1 |
2 files changed, 3 insertions, 1 deletions
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<QQuickDrawer*>(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); |