Delete move constructor and move-assignment for QEvent

As of 19f9b0d5f5 we define a protected copy
constructor and assignment operator. Static analyzers warn about missing
move variants, so delete those in addition.

Pick-to: 6.0 6.0.0
Change-Id: I28c1a2afd4560ce35a258bde507dafd93245b75b
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
bb10
Volker Hilsheimer 2020-11-20 17:35:13 +01:00
parent 27e08b0c40
commit 291e8e729e
1 changed files with 3 additions and 1 deletions

View File

@ -49,7 +49,9 @@ QT_BEGIN_NAMESPACE
#define Q_EVENT_DISABLE_COPY(Class) \
protected: \
Class(const Class &) = default; \
Class &operator=(const Class &other) = default
Class(Class &&) = delete; \
Class &operator=(const Class &other) = default; \
Class &operator=(Class &&) = delete
class QEventPrivate;
class Q_CORE_EXPORT QEvent // event base class