summaryrefslogtreecommitdiffstats
path: root/src/corelib/kernel/qproperty.h
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@qt.io>2020-09-28 10:32:00 +0200
committerFabian Kosmale <fabian.kosmale@qt.io>2020-09-29 20:32:42 +0200
commit04641454beb27f667062dbf79116729f159b0041 (patch)
tree2664d504dbb17f10792831f6e3b85e31640f3fba /src/corelib/kernel/qproperty.h
parent6b4e0c5803b4b8b4396791ba436d9692195993d6 (diff)
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 <ulf.hermann@qt.io>
Diffstat (limited to 'src/corelib/kernel/qproperty.h')
-rw-r--r--src/corelib/kernel/qproperty.h10
1 files changed, 1 insertions, 9 deletions
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<T>(initialValue) {}
explicit QProperty(rvalue_ref initialValue) : QPropertyData<T>(std::move(initialValue)) {}
- QProperty(QProperty &&other) : QPropertyData<T>(std::move(other.val)), d(std::move(other.d), this) { notify(); }
explicit QProperty(const QPropertyBinding<T> &binding)
: QProperty()
{ setBinding(binding); }
@@ -329,13 +328,6 @@ public:
template <typename Functor>
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 {