Introduce new macro Q_DISABLE_ASSIGN_MOVE.
This commit is contained in:
parent
05d064af1e
commit
4a89a0892f
|
@ -84,10 +84,16 @@
|
||||||
|
|
||||||
#if QT_VERSION < QT_VERSION_CHECK(5, 13, 0)
|
#if QT_VERSION < QT_VERSION_CHECK(5, 13, 0)
|
||||||
#define Q_DISABLE_MOVE(Class) \
|
#define Q_DISABLE_MOVE(Class) \
|
||||||
Class(Class &&) = delete; \
|
Class(Class &&) = delete; \
|
||||||
Class &operator=(Class &&) = delete;
|
Class &operator=(Class &&) = delete;
|
||||||
#define Q_DISABLE_COPY_MOVE(Class) \
|
#define Q_DISABLE_COPY_MOVE(Class) \
|
||||||
Q_DISABLE_COPY(Class) \
|
Q_DISABLE_COPY(Class) \
|
||||||
|
Q_DISABLE_MOVE(Class)
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef Q_DISABLE_ASSIGN_MOVE
|
||||||
|
#define Q_DISABLE_ASSIGN_MOVE(Class) \
|
||||||
|
Q_DISABLE_ASSIGN(Class) \
|
||||||
Q_DISABLE_MOVE(Class)
|
Q_DISABLE_MOVE(Class)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -84,10 +84,16 @@
|
||||||
|
|
||||||
#if QT_VERSION < QT_VERSION_CHECK(5, 13, 0)
|
#if QT_VERSION < QT_VERSION_CHECK(5, 13, 0)
|
||||||
#define Q_DISABLE_MOVE(Class) \
|
#define Q_DISABLE_MOVE(Class) \
|
||||||
Class(Class &&) = delete; \
|
Class(Class &&) = delete; \
|
||||||
Class &operator=(Class &&) = delete;
|
Class &operator=(Class &&) = delete;
|
||||||
#define Q_DISABLE_COPY_MOVE(Class) \
|
#define Q_DISABLE_COPY_MOVE(Class) \
|
||||||
Q_DISABLE_COPY(Class) \
|
Q_DISABLE_COPY(Class) \
|
||||||
|
Q_DISABLE_MOVE(Class)
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef Q_DISABLE_ASSIGN_MOVE
|
||||||
|
#define Q_DISABLE_ASSIGN_MOVE(Class) \
|
||||||
|
Q_DISABLE_ASSIGN(Class) \
|
||||||
Q_DISABLE_MOVE(Class)
|
Q_DISABLE_MOVE(Class)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -43,7 +43,7 @@ void qAsConst(const T &&) Q_DECL_EQ_DELETE;
|
||||||
|
|
||||||
#ifndef Q_DISABLE_ASSIGN
|
#ifndef Q_DISABLE_ASSIGN
|
||||||
#define Q_DISABLE_ASSIGN(Class) \
|
#define Q_DISABLE_ASSIGN(Class) \
|
||||||
Class &operator=(const Class &) Q_DECL_EQ_DELETE;
|
Class &operator=(const Class &) = delete;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if QT_VERSION < QT_VERSION_CHECK(5, 13, 0)
|
#if QT_VERSION < QT_VERSION_CHECK(5, 13, 0)
|
||||||
|
@ -55,6 +55,12 @@ void qAsConst(const T &&) Q_DECL_EQ_DELETE;
|
||||||
Q_DISABLE_MOVE(Class)
|
Q_DISABLE_MOVE(Class)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifndef Q_DISABLE_ASSIGN_MOVE
|
||||||
|
#define Q_DISABLE_ASSIGN_MOVE(Class) \
|
||||||
|
Q_DISABLE_ASSIGN(Class) \
|
||||||
|
Q_DISABLE_MOVE(Class)
|
||||||
|
#endif
|
||||||
|
|
||||||
#define SUFFIX_APPEND(x, y) x ## y // NOLINT(cppcoreguidelines-macro-usage)
|
#define SUFFIX_APPEND(x, y) x ## y // NOLINT(cppcoreguidelines-macro-usage)
|
||||||
|
|
||||||
#define HOURS_INT(x) ((x) * 3600000) // NOLINT(cppcoreguidelines-macro-usage)
|
#define HOURS_INT(x) ((x) * 3600000) // NOLINT(cppcoreguidelines-macro-usage)
|
||||||
|
|
|
@ -29,12 +29,23 @@
|
||||||
# define VPROPERTYEXPLORERSHARED_EXPORT Q_DECL_IMPORT
|
# define VPROPERTYEXPLORERSHARED_EXPORT Q_DECL_IMPORT
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifndef Q_DISABLE_ASSIGN
|
||||||
|
#define Q_DISABLE_ASSIGN(Class) \
|
||||||
|
Class &operator=(const Class &) = delete;
|
||||||
|
#endif
|
||||||
|
|
||||||
#if QT_VERSION < QT_VERSION_CHECK(5, 13, 0)
|
#if QT_VERSION < QT_VERSION_CHECK(5, 13, 0)
|
||||||
#define Q_DISABLE_MOVE(Class) \
|
#define Q_DISABLE_MOVE(Class) \
|
||||||
Class(Class &&) = delete; \
|
Class(Class &&) = delete; \
|
||||||
Class &operator=(Class &&) = delete;
|
Class &operator=(Class &&) = delete;
|
||||||
#define Q_DISABLE_COPY_MOVE(Class) \
|
#define Q_DISABLE_COPY_MOVE(Class) \
|
||||||
Q_DISABLE_COPY(Class) \
|
Q_DISABLE_COPY(Class) \
|
||||||
|
Q_DISABLE_MOVE(Class)
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef Q_DISABLE_ASSIGN_MOVE
|
||||||
|
#define Q_DISABLE_ASSIGN_MOVE(Class) \
|
||||||
|
Q_DISABLE_ASSIGN(Class) \
|
||||||
Q_DISABLE_MOVE(Class)
|
Q_DISABLE_MOVE(Class)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user