Delete move constructor and move-assignment for QEvent

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

Change-Id: I28c1a2afd4560ce35a258bde507dafd93245b75b
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 291e8e729ee7a28e579c3aea22fd4482cd271ed7)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
Volker Hilsheimer 2020-11-20 17:35:13 +01:00 committed by Qt Cherry-pick Bot
parent 4cd9ac52ed
commit 8335305df3

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