From 1e1b88809261854dee47c9bc105cf71e75b75cb9 Mon Sep 17 00:00:00 2001 From: Lars Knoll Date: Tue, 18 Aug 2020 12:18:27 +0200 Subject: Pass a pointer to the property data into the method evaluating a binding Make it possible to evaluate the binding but write the result into a different memory location. This will help support compat properties, where the setter does a lot of additional work. Change-Id: Ib60220eb629e3dcb5c0d7004b693e92290dfabe5 Reviewed-by: Fabian Kosmale --- src/corelib/kernel/qproperty.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/corelib/kernel/qproperty.h') diff --git a/src/corelib/kernel/qproperty.h b/src/corelib/kernel/qproperty.h index 14319f0382..c54d99f131 100644 --- a/src/corelib/kernel/qproperty.h +++ b/src/corelib/kernel/qproperty.h @@ -67,7 +67,7 @@ template class QPropertyData : public QUntypedPropertyData { protected: - T val = T(); + mutable T val = T(); private: class DisableRValueRefs {}; protected: @@ -341,7 +341,7 @@ public: parameter_type value() const { if (d.hasBinding()) - d.evaluateIfDirty(); + d.evaluateIfDirty(this); d.registerWithCurrentlyEvaluatingBinding(); return this->val; } -- cgit v1.2.3