diff options
author | Fabian Kosmale <fabian.kosmale@qt.io> | 2021-06-25 16:16:58 +0200 |
---|---|---|
committer | Lars Knoll <lars.knoll@qt.io> | 2021-08-09 14:53:44 +0000 |
commit | 3cf2df4a7e8a53a63068613311c4799e55c971b9 (patch) | |
tree | e06c00cc157af252a179d9af83ff78bbb832b1e0 /src/qml/qml/qqmljavascriptexpression.cpp | |
parent | 00b580427071acb9341bc49fe37e289201cbf02c (diff) |
Skip superfluous property capture attempt
If a QQmlProperyBinding tries to capture a QProperty, there is nothing
to do as the dependency tracking happens in C++ anyway. Thus we can
avoid calling captureProperty.
Pick-to: 6.2
Change-Id: I96b2876d4b2ba10b00af8342be9beae660a95ef3
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Diffstat (limited to 'src/qml/qml/qqmljavascriptexpression.cpp')
-rw-r--r-- | src/qml/qml/qqmljavascriptexpression.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/qml/qml/qqmljavascriptexpression.cpp b/src/qml/qml/qqmljavascriptexpression.cpp index c4c37a32be..f25fd0795c 100644 --- a/src/qml/qml/qqmljavascriptexpression.cpp +++ b/src/qml/qml/qqmljavascriptexpression.cpp @@ -394,7 +394,7 @@ void QQmlPropertyCapture::captureBindableProperty( { // if the property is a QPropery, and we're binding to a QProperty // the automatic capturing process already takes care of everything - if (typeid(QQmlPropertyBindingJS) == typeid(*expression)) + if (!expression->mustCaptureBindableProperty()) return; for (auto trigger = expression->qpropertyChangeTriggers; trigger; trigger = trigger->next) { |