summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@qt.io>2020-02-10 15:12:32 +0100
committerSimon Hausmann <simon.hausmann@qt.io>2020-03-19 13:09:03 +0100
commit58992993a381fedd2f0e36edb73a63cfb9b3bcea (patch)
tree1a9f1558db2f9643a728a40b175b278ad8286a94 /src
parent1fcce5105388b41c24c60324f678afb2d05e687f (diff)
Add support for explicitly marking a property as dirty
When a binding is backed by old-style property captures, then having this API is needed for Qml. Change-Id: Icf51efe057eaf845969ed2cda52d082dedde677e Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Diffstat (limited to 'src')
-rw-r--r--src/corelib/kernel/qproperty.h2
-rw-r--r--src/corelib/kernel/qpropertybinding.cpp7
2 files changed, 9 insertions, 0 deletions
diff --git a/src/corelib/kernel/qproperty.h b/src/corelib/kernel/qproperty.h
index 7fd8c2e17e..5e1d8ec2f6 100644
--- a/src/corelib/kernel/qproperty.h
+++ b/src/corelib/kernel/qproperty.h
@@ -137,6 +137,8 @@ public:
QMetaType valueMetaType() const;
+ void setDirty(bool dirty = true);
+
private:
explicit QUntypedPropertyBinding(const QPropertyBindingPrivatePtr &priv);
friend class QtPrivate::QPropertyBase;
diff --git a/src/corelib/kernel/qpropertybinding.cpp b/src/corelib/kernel/qpropertybinding.cpp
index fb372fcdfc..78d24cbdc1 100644
--- a/src/corelib/kernel/qpropertybinding.cpp
+++ b/src/corelib/kernel/qpropertybinding.cpp
@@ -162,4 +162,11 @@ QMetaType QUntypedPropertyBinding::valueMetaType() const
return d->metaType;
}
+void QUntypedPropertyBinding::setDirty(bool dirty)
+{
+ if (!d)
+ return;
+ d->dirty = dirty;
+}
+
QT_END_NAMESPACE