diff options
author | Ulf Hermann <ulf.hermann@qt.io> | 2021-06-08 17:27:23 +0200 |
---|---|---|
committer | Ulf Hermann <ulf.hermann@qt.io> | 2021-06-08 17:40:40 +0200 |
commit | ef7544bb5c6156462d169954c55afd38141e5a74 (patch) | |
tree | c88eeace150548cce16a1c46e9aa19a77bdbc671 /src/qml/qml/qqmlpropertyvalidator.cpp | |
parent | 95b448bf89575dfd79ca071ebfeab8960eff6864 (diff) |
Allow property observers on readonly properties
This makes it necessary to tolerate evaluate() calls after the engine is
gone. With non-QProperty properties this can't happen as the engine
controls the observers.
Change-Id: Ia700a10ad847b8a174b2346a4ad7a4de7afb0c83
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Diffstat (limited to 'src/qml/qml/qqmlpropertyvalidator.cpp')
-rw-r--r-- | src/qml/qml/qqmlpropertyvalidator.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/qml/qml/qqmlpropertyvalidator.cpp b/src/qml/qml/qqmlpropertyvalidator.cpp index deb747fa2f..f1826b2f1c 100644 --- a/src/qml/qml/qqmlpropertyvalidator.cpp +++ b/src/qml/qml/qqmlpropertyvalidator.cpp @@ -241,9 +241,11 @@ QVector<QQmlError> QQmlPropertyValidator::validateObject( } // Signal handlers were resolved and checked earlier in the signal handler conversion pass. - if (binding->flags & QV4::CompiledData::Binding::IsSignalHandlerExpression - || binding->flags & QV4::CompiledData::Binding::IsSignalHandlerObject) + if (binding->flags & (QV4::CompiledData::Binding::IsSignalHandlerExpression + | QV4::CompiledData::Binding::IsSignalHandlerObject + | QV4::CompiledData::Binding::IsPropertyObserver)) { continue; + } if (binding->type == QV4::CompiledData::Binding::Type_AttachedProperty) { if (instantiatingBinding && (instantiatingBinding->isAttachedProperty() || instantiatingBinding->isGroupProperty())) { |