diff options
author | Simon Hausmann <simon.hausmann@qt.io> | 2017-07-28 21:32:56 +0200 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@qt.io> | 2017-07-28 21:33:17 +0200 |
commit | 182983943b76bc0e40ff7693853ef2262323fa80 (patch) | |
tree | 4e542c3f2906e348da045375c3a3a85fc1d0d73c /src/qml/types/qqmllistmodel.cpp | |
parent | 8ced0f0f9954f857265fd18080da95427069135d (diff) | |
parent | 80e03bbd9a42401d50af450aff5351c3a0c95444 (diff) |
Merge remote-tracking branch 'origin/5.9' into dev
Change-Id: I7d092cce33cb009d63e7b0df7c71183089dea53f
Diffstat (limited to 'src/qml/types/qqmllistmodel.cpp')
-rw-r--r-- | src/qml/types/qqmllistmodel.cpp | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/src/qml/types/qqmllistmodel.cpp b/src/qml/types/qqmllistmodel.cpp index 517411fa47..20000557ee 100644 --- a/src/qml/types/qqmllistmodel.cpp +++ b/src/qml/types/qqmllistmodel.cpp @@ -1367,13 +1367,9 @@ ReturnedValue ModelObject::get(const Managed *m, String *name, bool *hasProperty if (QQmlEngine *qmlEngine = that->engine()->qmlEngine()) { QQmlEnginePrivate *ep = QQmlEnginePrivate::get(qmlEngine); - if (ep && ep->propertyCapture) { - QObjectPrivate *op = QObjectPrivate::get(that->object()); - // Temporarily hide the dynamic meta-object, to prevent it from being created when the capture - // triggers a QObject::connectNotify() by calling obj->metaObject(). - QScopedValueRollback<QDynamicMetaObjectData*> metaObjectBlocker(op->metaObject, 0); - ep->propertyCapture->captureProperty(that->object(), -1, role->index); - } + if (ep && ep->propertyCapture) + ep->propertyCapture->captureProperty(that->object(), -1, role->index, + QQmlPropertyCapture::OnlyOnce, false); } const int elementIndex = that->d()->m_elementIndex; |