diff --git a/src/corelib/global/qglobal.h b/src/corelib/global/qglobal.h index e769c43cef..204652f7c1 100644 --- a/src/corelib/global/qglobal.h +++ b/src/corelib/global/qglobal.h @@ -2407,9 +2407,15 @@ Q_CORE_EXPORT QString qtTrId(const char *id, int n = -1); classes contains a private copy constructor and assignment operator to disable copying (the compiler gives an error message). */ +#ifdef Q_COMPILER_DEFAULT_DELETE_MEMBERS +#define Q_DISABLE_COPY(Class) \ + Class(const Class &) = delete;\ + Class &operator=(const Class &) = delete; +#else #define Q_DISABLE_COPY(Class) \ Class(const Class &); \ Class &operator=(const Class &); +#endif class QByteArray; Q_CORE_EXPORT QByteArray qgetenv(const char *varName);