diff options
author | J-P Nurmi <jpnurmi@qt.io> | 2017-03-22 14:54:06 +0100 |
---|---|---|
committer | J-P Nurmi <jpnurmi@qt.io> | 2017-03-22 16:29:15 +0000 |
commit | f1a87abffefe446eaf22be13c8b574b8373f13dd (patch) | |
tree | 022cc0c17028992696e564865c18bf5b3e521746 /src/quickcontrols2/qquickattachedobject_p.h | |
parent | 4354efee0f009833947fb0e129da0933deb555fb (diff) |
QQuickAttachedObject: align attaching and detaching
At construction time it was casting the parent to an item and falling
back to popup if it wasn't an item, but at destruction time it was
only doing the item cast. Unify the two so that both paths are tested
when detaching too.
Change-Id: Ic94d7686600d3502e195ded2d7007cb0fef76764
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Diffstat (limited to 'src/quickcontrols2/qquickattachedobject_p.h')
-rw-r--r-- | src/quickcontrols2/qquickattachedobject_p.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/quickcontrols2/qquickattachedobject_p.h b/src/quickcontrols2/qquickattachedobject_p.h index 7fc0ce13..923bdef9 100644 --- a/src/quickcontrols2/qquickattachedobject_p.h +++ b/src/quickcontrols2/qquickattachedobject_p.h @@ -81,6 +81,9 @@ protected: void itemParentChanged(QQuickItem *item, QQuickItem *parent) override; private: + void attachTo(QObject *object); + void detachFrom(QObject *object); + QList<QQuickAttachedObject *> m_attachedChildren; QPointer<QQuickAttachedObject> m_attachedParent; }; |