aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/types/qqmllistmodel.cpp
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@qt.io>2017-07-28 21:32:56 +0200
committerSimon Hausmann <simon.hausmann@qt.io>2017-07-28 21:33:17 +0200
commit182983943b76bc0e40ff7693853ef2262323fa80 (patch)
tree4e542c3f2906e348da045375c3a3a85fc1d0d73c /src/qml/types/qqmllistmodel.cpp
parent8ced0f0f9954f857265fd18080da95427069135d (diff)
parent80e03bbd9a42401d50af450aff5351c3a0c95444 (diff)
Merge remote-tracking branch 'origin/5.9' into dev
Diffstat (limited to 'src/qml/types/qqmllistmodel.cpp')
-rw-r--r--src/qml/types/qqmllistmodel.cpp10
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;