summaryrefslogtreecommitdiffstats
path: root/src/corelib/kernel/qproperty.h
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@qt.io>2020-08-18 12:18:27 +0200
committerLars Knoll <lars.knoll@qt.io>2020-09-02 22:44:29 +0200
commit1e1b88809261854dee47c9bc105cf71e75b75cb9 (patch)
treefe99be6a3049500a2fc50d752a51076a1d4f5a0f /src/corelib/kernel/qproperty.h
parent3b3b190eef036ffefb5275e6f03e9f933d3609ff (diff)
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 <fabian.kosmale@qt.io>
Diffstat (limited to 'src/corelib/kernel/qproperty.h')
-rw-r--r--src/corelib/kernel/qproperty.h4
1 files changed, 2 insertions, 2 deletions
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 <typename T>
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;
}