diff options
author | Simon Hausmann <simon.hausmann@qt.io> | 2017-09-22 15:01:27 +0200 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@qt.io> | 2017-09-22 13:31:02 +0000 |
commit | f17b826a72d77379288aa84a933b9231c279cbad (patch) | |
tree | f1e95ca5d2ad6ccc28dc6caf040d740bb2e26b13 /src | |
parent | 163c515783877b8b0ffb8b5c1bab288addee9745 (diff) |
Fix behaviors not working when sub-types declare properties
Since commit 81867dfbf9c16d4300727a08eed9b5c6c979e0ba we have an
optimization in place to avoid the virtual meta-call when writing
properties that cannot be intercepted. Unfortunately that check did not
take parent VME meta-objects into account, which triggered the bug.
Test case by Harald Hvaal <hhvaal@cisco.com>
Task-number: QTBUG-63365
Change-Id: I66cb2967da2c09ca5e38cebd9db2ee6e3ee78f5f
Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
Diffstat (limited to 'src')
-rw-r--r-- | src/qml/qml/qqmlvmemetaobject_p.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/qml/qml/qqmlvmemetaobject_p.h b/src/qml/qml/qqmlvmemetaobject_p.h index ede1dd74f9..2dff2b7a01 100644 --- a/src/qml/qml/qqmlvmemetaobject_p.h +++ b/src/qml/qml/qqmlvmemetaobject_p.h @@ -112,6 +112,8 @@ public: if (it->m_propertyIndex == propertyIndex) return true; } + if (auto parentInterceptor = ((parent.isT1() && parent.flag()) ? static_cast<QQmlInterceptorMetaObject *>(parent.asT1()) : 0)) + return parentInterceptor->intercepts(propertyIndex); return false; } |