diff options
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; |