diff options
author | Qt Forward Merge Bot <qt_forward_merge_bot@qt-project.org> | 2019-07-04 13:32:18 +0200 |
---|---|---|
committer | Qt Forward Merge Bot <qt_forward_merge_bot@qt-project.org> | 2019-07-04 13:32:18 +0200 |
commit | 07205972ca9c6f5688a8fe261155989c130f8d9b (patch) | |
tree | 53c99681d6d6049e3f3f7a751ad6aa3589853d66 /src | |
parent | 341ab7708049b1a3f559b76f16393e688951a938 (diff) | |
parent | 47b2cde5dcca49a1969a43b294931323eff68f74 (diff) |
Merge remote-tracking branch 'origin/5.13' into dev
Conflicts:
.qmake.conf
Change-Id: I20ad6f8a260f387a3b73566a32c35a5772b401a5
Diffstat (limited to 'src')
-rw-r--r-- | src/qml/qml/qqmlobjectcreator.cpp | 3 | ||||
-rw-r--r-- | src/qmlmodels/qqmldelegatemodel.cpp | 2 | ||||
-rw-r--r-- | src/quick/items/qquickitem_p.h | 13 |
3 files changed, 10 insertions, 8 deletions
diff --git a/src/qml/qml/qqmlobjectcreator.cpp b/src/qml/qml/qqmlobjectcreator.cpp index 11d585fec5..be40eeb58a 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/qmlmodels/qqmldelegatemodel.cpp b/src/qmlmodels/qqmldelegatemodel.cpp index 859fbae187..6c80f4a3e5 100644 --- a/src/qmlmodels/qqmldelegatemodel.cpp +++ b/src/qmlmodels/qqmldelegatemodel.cpp @@ -2654,10 +2654,10 @@ QJSValue 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 QJSValue(v4, o->asReturnedValue()); } diff --git a/src/quick/items/qquickitem_p.h b/src/quick/items/qquickitem_p.h index 847fd90230..3e8feec4bf 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> @@ -687,12 +688,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; |