diff options
Diffstat (limited to 'src/corelib/serialization/qcborcommon.h')
-rw-r--r-- | src/corelib/serialization/qcborcommon.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/corelib/serialization/qcborcommon.h b/src/corelib/serialization/qcborcommon.h index 2c6d44657d..9661cd70bb 100644 --- a/src/corelib/serialization/qcborcommon.h +++ b/src/corelib/serialization/qcborcommon.h @@ -48,6 +48,13 @@ #pragma qt_class(QtCborCommon) #endif +/* X11 headers use these values too, but as defines */ +#if defined(False) && defined(True) +# define QT_X11_DEFINES_FOUND 1 +# undef True +# undef False +#endif + QT_BEGIN_NAMESPACE enum class QCborSimpleType : quint8 { @@ -130,4 +137,11 @@ QT_END_NAMESPACE Q_DECLARE_METATYPE(QCborTag) +// To avoid changing namespace we need to reinstate defines, even though our .cpp +// will then have to remove them again. +#if defined(QT_X11_DEFINES_FOUND) +# define True 1 +# define False 0 +#endif + #endif // QCBORSTREAM_H |