Details
-
Type:
Bug
-
Status: Closed
-
Priority:
P4: Low
-
Resolution: Done
-
Affects Version/s: 5.15.0, 5.15.1
-
Fix Version/s: 6.0.0 RC
-
Component/s: Core: Other
-
Labels:None
-
Platform/s:
-
Commits:be0f1af3f1829da0d321c12dbd40d5743d3b2eb5 (qt/qtbase/dev)
Description
in qcborstreamreader.h there is
// See qcborcommon.h for why we check #if defined(QT_X11_DEFINES_FOUND) # undef True # undef False #endif
and in qcborcommon.h
#if defined(False) && defined(True)
# define QT_X11_DEFINES_FOUND 1
# undef True
# undef False
#endif
This can lead to includes order hell, if True/False isn't defined when qcborcommon.h is included which QJsonValue does.
my example is using live555 which defines True/False. If live555 includes do not come before any Qt includes which leads to qcborcommon.h, than the above inĀ qcborstreamreader.h will not undefine True/False.
Besides the point using True/False in an enum is poor practice, bridging these #if defined will certainly force a includes order. Proper practice is to also check True/False in qcborstreamreader.h
Attachments
For Gerrit Dashboard: QTBUG-88591 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
322360,2 | CBOR: remove the X11 True and False for good | 5.15 | qt/qtbase | Status: ABANDONED | +2 | 0 |
322380,2 | CBOR: remove the X11 True and False for good | dev | qt/qtbase | Status: MERGED | +2 | 0 |