Details
-
Bug
-
Resolution: Done
-
P2: Important
-
5.12
-
None
-
-
4b10298de54a7cacb5f25601f8e3ae5d233806d3
Description
The new CBOR classes in qtbase/src/corelib/serialization employ the use of an enum for 'simple types', which defines values like
enum class QCborSimpleType : quint8 { False = 20, True = 21, Null = 22, Undefined = 23 };
This definition conflicts with the use of X11 codes (which use #define commands for True and for False), which breaks compilation of 3 KDE repositories (kscreenlocker, kwin, and plasma-workspace).
Usually one can work around X11 symbol pollution by #undef'ing the excess symbols (KDE uses a "fixx11h.h" include which does this for most symbols). However the True/False symbols are the documented proper values to use for many X11 calls and so this would affect most X11 users even if they already employ a similar namespace cleanup hack.
Making this more interesting is that it's very easy to end up pulling in the qcborcommon.h header (e.g. QtDBus pulls in all of QtCore), so it's not just a matter of making sure to have the right include order like most X11 problems come down to.
I have a patch for Qt that fixes the build for all 3 KDE repositories I experienced failures on, which I will post separately.