aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml
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
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')
-rw-r--r--src/qml/qml/qqmlobjectcreator.cpp3
-rw-r--r--src/qml/types/qqmldelegatemodel.cpp2
2 files changed, 3 insertions, 2 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();
}
diff --git a/src/qml/types/qqmldelegatemodel.cpp b/src/qml/types/qqmldelegatemodel.cpp
index 63bc64d5e6..af328fbe2a 100644
--- a/src/qml/types/qqmldelegatemodel.cpp
+++ b/src/qml/types/qqmldelegatemodel.cpp
@@ -2656,10 +2656,10 @@ QQmlV4Handle QQmlDelegateModelGroup::get(int index)
model->m_cacheMetaType->initializePrototype();
QV4::ExecutionEngine *v4 = model->m_cacheMetaType->v4Engine;
QV4::Scope scope(v4);
+ ++cacheItem->scriptRef;
QV4::ScopedObject o(scope, v4->memoryManager->allocate<QQmlDelegateModelItemObject>(cacheItem));
QV4::ScopedObject p(scope, model->m_cacheMetaType->modelItemProto.value());
o->setPrototypeOf(p);
- ++cacheItem->scriptRef;
return QQmlV4Handle(o);
}