Introduce new macro Q_DISABLE_ASSIGN_MOVE.
This commit is contained in:
parent
05d064af1e
commit
4a89a0892f
|
@ -91,6 +91,12 @@ 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)
|
||||
#endif
|
||||
|
||||
QT_WARNING_PUSH
|
||||
QT_WARNING_DISABLE_GCC("-Wattributes")
|
||||
|
||||
|
|
|
@ -91,6 +91,12 @@ 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)
|
||||
#endif
|
||||
|
||||
typedef signed char dint8; /* 8 bit signed */
|
||||
typedef signed short dint16; /* 16 bit signed */
|
||||
typedef signed int dint32; /* 32 bit signed */
|
||||
|
|
|
@ -43,7 +43,7 @@ void qAsConst(const T &&) Q_DECL_EQ_DELETE;
|
|||
|
||||
#ifndef Q_DISABLE_ASSIGN
|
||||
#define Q_DISABLE_ASSIGN(Class) \
|
||||
Class &operator=(const Class &) Q_DECL_EQ_DELETE;
|
||||
Class &operator=(const Class &) = delete;
|
||||
#endif
|
||||
|
||||
#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)
|
||||
#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 HOURS_INT(x) ((x) * 3600000) // NOLINT(cppcoreguidelines-macro-usage)
|
||||
|
|
|
@ -29,6 +29,11 @@
|
|||
# define VPROPERTYEXPLORERSHARED_EXPORT Q_DECL_IMPORT
|
||||
#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)
|
||||
#define Q_DISABLE_MOVE(Class) \
|
||||
Class(Class &&) = delete; \
|
||||
|
@ -38,4 +43,10 @@ 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)
|
||||
#endif
|
||||
|
||||
#endif // VPROPERTYEXPLORER_GLOBAL_H
|
||||
|
|
Loading…
Reference in New Issue
Block a user