aboutsummaryrefslogtreecommitdiffstats
path: root/src
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
parent71d4a62661f771f1ac900fab02840f7863a0deed (diff)
parent6dffa5400fd056e3862a2f8905362679c1bb6be7 (diff)
Merge remote-tracking branch 'origin/5.12' into 5.13
Conflicts: .qmake.conf Change-Id: Icd05d016de5b4cf9af5234cb47b5c3fd0f6a053e
Diffstat (limited to 'src')
-rw-r--r--src/qml/qml/qqmlobjectcreator.cpp3
-rw-r--r--src/qml/types/qqmldelegatemodel.cpp2
-rw-r--r--src/quick/items/qquickitem_p.h13
3 files changed, 10 insertions, 8 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);
}
diff --git a/src/quick/items/qquickitem_p.h b/src/quick/items/qquickitem_p.h
index 771228914b..f618bcf1c3 100644
--- a/src/quick/items/qquickitem_p.h
+++ b/src/quick/items/qquickitem_p.h
@@ -75,6 +75,7 @@
#include <QtCore/qlist.h>
#include <QtCore/qdebug.h>
#include <QtCore/qelapsedtimer.h>
+#include <QtCore/qpointer.h>
#if QT_CONFIG(quick_shadereffect)
#include <QtQuick/private/qquickshadereffectsource_p.h>
@@ -682,12 +683,12 @@ public:
: leftSet(false), rightSet(false), upSet(false), downSet(false),
tabSet(false), backtabSet(false) {}
- QQuickItem *left = nullptr;
- QQuickItem *right = nullptr;
- QQuickItem *up = nullptr;
- QQuickItem *down = nullptr;
- QQuickItem *tab = nullptr;
- QQuickItem *backtab = nullptr;
+ QPointer<QQuickItem> left;
+ QPointer<QQuickItem> right;
+ QPointer<QQuickItem> up;
+ QPointer<QQuickItem> down;
+ QPointer<QQuickItem> tab;
+ QPointer<QQuickItem> backtab;
bool leftSet : 1;
bool rightSet : 1;
bool upSet : 1;