From ccad6b577016c8a0986f56b2656471896b5817ea Mon Sep 17 00:00:00 2001 From: Lars Knoll Date: Tue, 3 Apr 2018 12:37:04 +0200 Subject: 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 --- src/quick/items/qquickloader.cpp | 5 +---- 1 file changed, 1 insertion(+), 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(); } /*! -- cgit v1.2.3