aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@qt.io>2018-04-03 12:37:04 +0200
committerSimon Hausmann <simon.hausmann@qt.io>2018-04-09 13:42:21 +0000
commitccad6b577016c8a0986f56b2656471896b5817ea (patch)
treecfb896812181a1603b51812436bc5ea000c5dcbb
parent740462a87480e1b347d833321cdcf316840c1c13 (diff)
clear() the loader before destroying it
This prevents bindings in children being evaluated and removes spurious qml errors on the command line. Amends 2eb2d6386da304cd1164264ae0bff685c796d89c. Task-number: QTBUG-63729 Change-Id: I88b85ed40c6b8c5fbb422831055942cc0f4ee424 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
-rw-r--r--src/quick/items/qquickloader.cpp5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/quick/items/qquickloader.cpp b/src/quick/items/qquickloader.cpp
index 6960e16bd9..cd48896e58 100644
--- a/src/quick/items/qquickloader.cpp
+++ b/src/quick/items/qquickloader.cpp
@@ -311,10 +311,7 @@ QQuickLoader::QQuickLoader(QQuickItem *parent)
QQuickLoader::~QQuickLoader()
{
Q_D(QQuickLoader);
- if (d->item) {
- QQuickItemPrivate *p = QQuickItemPrivate::get(d->item);
- p->removeItemChangeListener(d, watchedChanges);
- }
+ d->clear();
}
/*!