aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/qml/qqmlobjectcreator.cpp
diff options
context:
space:
mode:
authorQt Forward Merge Bot <qt_forward_merge_bot@qt-project.org>2019-07-03 01:00:30 +0200
committerSimon Hausmann <simon.hausmann@qt.io>2019-07-03 06:11:21 +0000
commit97aa001da97ee8531b3de4bd97496478b2f3f2e9 (patch)
tree62ff6e849ea545769c8e5f245eaa34531760a1a2 /src/qml/qml/qqmlobjectcreator.cpp
parent71d4a62661f771f1ac900fab02840f7863a0deed (diff)
parent6dffa5400fd056e3862a2f8905362679c1bb6be7 (diff)
Merge remote-tracking branch 'origin/5.12' into 5.13
Conflicts: .qmake.conf Change-Id: Icd05d016de5b4cf9af5234cb47b5c3fd0f6a053e
Diffstat (limited to 'src/qml/qml/qqmlobjectcreator.cpp')
-rw-r--r--src/qml/qml/qqmlobjectcreator.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/qml/qml/qqmlobjectcreator.cpp b/src/qml/qml/qqmlobjectcreator.cpp
index 18105aa75f..e45515fbcf 100644
--- a/src/qml/qml/qqmlobjectcreator.cpp
+++ b/src/qml/qml/qqmlobjectcreator.cpp
@@ -1384,7 +1384,8 @@ QQmlContextData *QQmlObjectCreator::finalize(QQmlInstantiationInterrupt &interru
QQmlPropertyData::DontRemoveBinding);
if (!b->isValueTypeProxy()) {
QQmlBinding *binding = static_cast<QQmlBinding*>(b.data());
- if (!binding->hasError() && !binding->hasDependencies())
+ if (!binding->hasError() && !binding->hasDependencies()
+ && binding->context() && !binding->context()->unresolvedNames)
b->removeFromObject();
}