Opened 6 years ago

Closed 6 years ago

Last modified 6 years ago

#12065 closed Patch - Feature (fixed)

Qt5 feature patch to resolve X11/Xlib.h Bool define issue

Reported by: Gary Buhrmaster <gary.buhrmaster@…> Owned by: Stuart Auchterlonie
Priority: minor Milestone: 0.28
Component: MythTV - Video Library Version: Master Head
Severity: medium Keywords: Qt5
Cc: Ticket locked: no

Description

Qt5 has been released, and some distros are starting to provide it as an alternative to Qt4, although I would not expect Qt5 to be the default for quite some time. Regardless, one of the changes in Qt5 (5.2) is that in qjsonvalue.h there is an enum which includes a line of the form ".. Bool = 0x1 ..". Unfortunately, the X11/Xlib.h has a "#define Bool int" line, which results in the qjsonvalue enum looking like ".. int = 0x1 ..", which generates badness when Xlib.h is included before the appropriate Qt include (mythimage.h includes QImageReader.h which eventually includes qjsonobject.h and qjsonvalue.h). This patch rearranges the includes in the impacted MythTV source files to bypass the issue and allows compilation to proceed.

Github ref: https://github.com/garybuhrmaster/mythtv/commit/01d52e44ec41fb71bde841d2fbbbe248fe648272 Github git-am ref: https://github.com/garybuhrmaster/mythtv/commit/01d52e44ec41fb71bde841d2fbbbe248fe648272.patch

Change History (4)

comment:1 Changed 6 years ago by Gary Buhrmaster <gary.buhrmaster@…>

Owner: set to Gary Buhrmaster <gary.buhrmaster@…>
Resolution: fixed
Status: newclosed

In be37aef1306a94995ed0c9fd9ac70a6117dc81f9/mythtv:

Resolve X11/Xlib.h define of Bool and Qt5 (5.2)

Xlib.h has a "#define Bool int", which causes compilation issues with other uses of
Bool, specifically in qsonvalue.h in Qt5. This patch rearranges the MythTV source file
includes to bypass the issue.

Fixes #12065
Signed-off-by: Stuart Auchterlonie <stuarta@…>

comment:2 Changed 6 years ago by Stuart Auchterlonie

Milestone: unknown0.28

comment:3 Changed 6 years ago by Gary Buhrmaster <gary.buhrmaster@…>

In 83ddcc8dda52365c38e5c767cc2479e59c576442/mythtv:

Resolve X11/Xlib.h define of Bool and Qt5 (5.2)

Xlib.h has a "#define Bool int", which causes compilation issues with other uses of
Bool, specifically in qsonvalue.h in Qt5. This patch rearranges the MythTV source file
includes to bypass the issue.

Fixes #12065
Signed-off-by: Stuart Auchterlonie <stuarta@…>

Signed-off-by: Stuart Auchterlonie <stuarta@…>

comment:4 Changed 6 years ago by Stuart Auchterlonie

Owner: changed from Gary Buhrmaster <gary.buhrmaster@…> to Stuart Auchterlonie
Note: See TracTickets for help on using tickets.