Make use of deleted members in Q_DISABLE_COPY
Might help the compiler to produce better error message. Change-Id: I1df3c32084b9ecda0b2a140776ad5f57adfb2e6e Reviewed-by: Thiago Reviewed-on: http://codereview.qt.nokia.com/1177 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Denis Dzyubenko <denis.dzyubenko@nokia.com>
This commit is contained in:
parent
21c4f1806e
commit
60cb6d7f3b
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user