From 04641454beb27f667062dbf79116729f159b0041 Mon Sep 17 00:00:00 2001 From: Lars Knoll Date: Mon, 28 Sep 2020 10:32:00 +0200 Subject: Disable moving of QProperty The semantics are not very intuitive, and it opens a can of worms with regards to what should happen with observers that observe that property. Change-Id: I6fb00b7693904b968224cc87d098bbd0ea776ba3 Reviewed-by: Ulf Hermann --- src/corelib/kernel/qproperty.h | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) (limited to 'src/corelib/kernel/qproperty.h') diff --git a/src/corelib/kernel/qproperty.h b/src/corelib/kernel/qproperty.h index 09b2642e73..156696dace 100644 --- a/src/corelib/kernel/qproperty.h +++ b/src/corelib/kernel/qproperty.h @@ -315,7 +315,6 @@ public: QProperty() = default; explicit QProperty(parameter_type initialValue) : QPropertyData(initialValue) {} explicit QProperty(rvalue_ref initialValue) : QPropertyData(std::move(initialValue)) {} - QProperty(QProperty &&other) : QPropertyData(std::move(other.val)), d(std::move(other.d), this) { notify(); } explicit QProperty(const QPropertyBinding &binding) : QProperty() { setBinding(binding); } @@ -329,13 +328,6 @@ public: template explicit QProperty(Functor &&f); #endif - QProperty &operator=(QProperty &&other) - { - this->val = std::move(other.val); - d.moveAssign(std::move(other.d), this); - notify(); - return *this; - } ~QProperty() = default; parameter_type value() const @@ -460,7 +452,7 @@ private: d.notifyObservers(this); } - Q_DISABLE_COPY(QProperty) + Q_DISABLE_COPY_MOVE(QProperty) }; namespace Qt { -- cgit v1.2.3