From 29ef667a69378c992e31065c6f24c8fe227aaada Mon Sep 17 00:00:00 2001 From: Fabian Kosmale Date: Fri, 5 Feb 2021 15:02:35 +0100 Subject: [PATCH] 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 Reviewed-by: Lars Knoll --- src/corelib/kernel/qproperty_p.h | 6 ++++++ 1 file changed, 6 insertions(+) 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 setBinding(const QPropertyBinding &newBinding) { QtPrivate::QPropertyBindingData *bd = qGetBindingStorage(owner())->bindingData(this, true);