aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/qml/qqmlbinding.cpp
diff options
context:
space:
mode:
authorErik Verbruggen <erik.verbruggen@qt.io>2016-07-15 16:15:52 +0200
committerErik Verbruggen <erik.verbruggen@qt.io>2016-07-19 12:32:54 +0000
commitfa06494d888727d229cd47efbe7265d61c7f7c25 (patch)
tree708768813af1e0465224e381adfe5667a5a7426a /src/qml/qml/qqmlbinding.cpp
parentac326046e1dffac5052cca1138078a26f34cf159 (diff)
QML: Fix check when to use accessors
The bit indicating if accessors could be used only returned true when an interceptor was added to the object, but the property in question was not intercepted. So it missed the case where no interceptor was installed on any property of the object. Change-Id: I355eb7bbe232f512d02c1b9783a0e6f990552689 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'src/qml/qml/qqmlbinding.cpp')
-rw-r--r--src/qml/qml/qqmlbinding.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/qml/qml/qqmlbinding.cpp b/src/qml/qml/qqmlbinding.cpp
index 78d0a4386f..9737dfdd6b 100644
--- a/src/qml/qml/qqmlbinding.cpp
+++ b/src/qml/qml/qqmlbinding.cpp
@@ -463,11 +463,11 @@ void QQmlBinding::setEnabled(bool e, QQmlPropertyPrivate::WriteFlags flags)
setEnabledFlag(e);
setNotifyOnValueChanged(e);
- m_nextBinding.clearFlag2();
+ m_nextBinding.setFlag2(); // Always use accessors, only not when:
if (auto interceptorMetaObject = QQmlInterceptorMetaObject::get(targetObject())) {
int coreIndex = getPropertyCoreIndex();
- if (coreIndex != -1 && !interceptorMetaObject->intercepts(coreIndex))
- m_nextBinding.setFlag2();
+ if (coreIndex == -1 || interceptorMetaObject->intercepts(coreIndex))
+ m_nextBinding.clearFlag2();
}
if (e)