summaryrefslogtreecommitdiffstats
path: root/src/corelib/kernel
diff options
context:
space:
mode:
authorFabian Kosmale <fabian.kosmale@qt.io>2021-02-05 15:02:35 +0100
committerFabian Kosmale <fabian.kosmale@qt.io>2021-04-01 10:04:35 +0200
commit29ef667a69378c992e31065c6f24c8fe227aaada (patch)
tree9e890672385bfb4656f932019bb07f5ad30e07dc /src/corelib/kernel
parent4ceaf22bed1bc0ed2dec4628fd9d9814c0e0fd86 (diff)
QObjectCompatProperty: Reintroduce operator=
This is a partial revert of a1a2d97e34eb7e2445877cf9e557db55a3540f9d. Reason: The new design does not notify automatically anymore, so using operator= is safe to use. Change-Id: I6cb735e40c0da72d22fcc426423eb7830901e5f4 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Diffstat (limited to 'src/corelib/kernel')
-rw-r--r--src/corelib/kernel/qproperty_p.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/corelib/kernel/qproperty_p.h b/src/corelib/kernel/qproperty_p.h
index b4d41a362b..d0a2882293 100644
--- a/src/corelib/kernel/qproperty_p.h
+++ b/src/corelib/kernel/qproperty_p.h
@@ -471,6 +471,12 @@ public:
this->val = t;
}
+ QObjectCompatProperty &operator=(parameter_type newValue)
+ {
+ setValue(newValue);
+ return *this;
+ }
+
QPropertyBinding<T> setBinding(const QPropertyBinding<T> &newBinding)
{
QtPrivate::QPropertyBindingData *bd = qGetBindingStorage(owner())->bindingData(this, true);