diff options
author | Michael Pyne <mpyne@kde.org> | 2018-07-04 11:36:14 -0400 |
---|---|---|
committer | Michael Pyne <mpyne@kde.org> | 2018-07-04 23:36:17 +0000 |
commit | 4b10298de54a7cacb5f25601f8e3ae5d233806d3 (patch) | |
tree | 738a7e3a9e864f5e509d67782dc3609ebeda075a /src/corelib/serialization/qcborvalue.h | |
parent | 21ea8c05ffa719cd3342b4a1c02620b556f4ec7b (diff) |
CBOR: Avoid conflicts with X11 #defines in our enums
Since the .cpp files in the implementation don't actually include the
offending X11 headers they don't need the fix. This just adjusts the
headers themselves to unbreak the namespace for just long enough to
declare the right enums.
Change-Id: If33757aa2289f8fe7b81836f9c08b0ad4592bc32
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/corelib/serialization/qcborvalue.h')
-rw-r--r-- | src/corelib/serialization/qcborvalue.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/corelib/serialization/qcborvalue.h b/src/corelib/serialization/qcborvalue.h index b7280dd35f..8411830835 100644 --- a/src/corelib/serialization/qcborvalue.h +++ b/src/corelib/serialization/qcborvalue.h @@ -51,6 +51,12 @@ #include <QtCore/qvariant.h> #include <QtCore/qvector.h> +// See qcborcommon.h for why we check +#if defined(QT_X11_DEFINES_FOUND) +# undef True +# undef False +#endif + #if QT_HAS_INCLUDE(<compare>) # include <compare> #endif @@ -438,4 +444,9 @@ Q_CORE_EXPORT QDebug operator<<(QDebug, const QCborValue &v); QT_END_NAMESPACE +#if defined(QT_X11_DEFINES_FOUND) +# define True 1 +# define False 0 +#endif + #endif // QCBORVALUE_H |