diff options
author | Mitch Curtis <mitch.curtis@qt.io> | 2016-09-13 10:23:22 +0200 |
---|---|---|
committer | Jani Heikkinen <jani.heikkinen@qt.io> | 2016-09-13 10:47:18 +0000 |
commit | 59c6c0e0b1b5b46747595a58e11311b7393d7e70 (patch) | |
tree | b664b45ffa5288e9859be27280a37b5e1ae04c4b /src | |
parent | 9be0d5b9e8ad510801ea8fab93b8e5433ea47f3e (diff) | |
download | qtquickcontrols-59c6c0e0b1b5b46747595a58e11311b7393d7e70.tar.gz |
The layout was being destroyed before the text, which meant that the
removeItemChangeListener() call never got hit. To ensure that the
listener is always removed, loop through each child in QQuickLayout's
destructor.
Task-number: QTBUG-51927
Change-Id: I4235579501bd1790e9483a8741915e55f1b1b803
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
Diffstat (limited to 'src')
-rw-r--r-- | src/layouts/qquicklayout.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/layouts/qquicklayout.cpp b/src/layouts/qquicklayout.cpp index f28a7d07..a7e63195 100644 --- a/src/layouts/qquicklayout.cpp +++ b/src/layouts/qquicklayout.cpp @@ -695,6 +695,9 @@ QQuickLayout::QQuickLayout(QQuickLayoutPrivate &dd, QQuickItem *parent) QQuickLayout::~QQuickLayout() { d_func()->m_isReady = false; + + foreach (QQuickItem *child, d_func()->childItems) + QQuickItemPrivate::get(child)->removeItemChangeListener(this, QQuickItemPrivate::SiblingOrder); } QQuickLayoutAttached *QQuickLayout::qmlAttachedProperties(QObject *object) |