diff options
author | Lars Knoll <lars.knoll@qt.io> | 2020-07-08 12:07:13 +0200 |
---|---|---|
committer | Lars Knoll <lars.knoll@qt.io> | 2020-07-10 15:07:12 +0200 |
commit | bbfecdee1e2952c401e9c5ac6e16adc2428fb2dc (patch) | |
tree | 4b877d63b50606930bbac7416b3d164ae69cb70a /src/corelib/kernel/qproperty.cpp | |
parent | be1ce6b26909256e62c2b39e4de9f8f79d070937 (diff) |
Significantly improve performance of binding evaluation
Avoid any QVariant or type dependent code in the cpp files.
Instead, let the binding wrapper determine if the value
has changed and return true/false accordingly.
This required also some reworking of the guard mechanism
for notified properties, where the guard function wrapper
now calls first the binding evaluation function and then
passes the result to the guard.
Change-Id: I350d07a508ccc0c5db7054a0efa4f270b6a78ec3
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Diffstat (limited to 'src/corelib/kernel/qproperty.cpp')
-rw-r--r-- | src/corelib/kernel/qproperty.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/corelib/kernel/qproperty.cpp b/src/corelib/kernel/qproperty.cpp index f7039cc62a..9374ce3a74 100644 --- a/src/corelib/kernel/qproperty.cpp +++ b/src/corelib/kernel/qproperty.cpp @@ -95,8 +95,8 @@ QPropertyBase::~QPropertyBase() QUntypedPropertyBinding QPropertyBase::setBinding(const QUntypedPropertyBinding &binding, void *propertyDataPtr, void *staticObserver, - void (*staticObserverCallback)(void*, void*), - bool (*guardCallback)(void *, void*)) + QPropertyObserverCallback staticObserverCallback, + QtPrivate::QPropertyGuardFunction guardCallback) { QPropertyBindingPrivatePtr oldBinding; QPropertyBindingPrivatePtr newBinding = binding.d; |