[KDE/Mac] Review Request 122276: [OS X] use a more accurate Display stub typedef

René J.V. Bertin rjvbertin at gmail.com
Tue Jan 27 17:17:01 UTC 2015


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/122276/
-----------------------------------------------------------

Review request for KDE Software on Mac OS X and kdelibs.


Repository: kdelibs


Description
-------

Qt on OS X does not build against X11/xcb, and thus doesn't provide any X11 functionality. To facilitate porting, `kapplication.h` has always contained a stub typedef for the Display type.

However, it is possible that the X11 headers are present on the system (for instance when installing through MacPorts), and typedef clashes can thus occur when those headers are included in client code. Or, as with QtCurve, when client code provides its own stub or forward typedef of the Display type (see QtCurve/lib/utils/x11base.h).
C++11 allows repeated typedefs, but apparently only when they repeat ("confirm") the definition, not to change the type.

This patch makes the typedef in kapplication.h compatible with C++11 style re-typedef'ing of the Display type by copying the definition used by the XOrg code.


Diffs
-----

  kdeui/kernel/kapplication.h fa2ab26 

Diff: https://git.reviewboard.kde.org/r/122276/diff/


Testing
-------

On OS X 10.9.5 with kdelibs 4.14.4 and QtCurve git/master.


Thanks,

René J.V. Bertin

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-mac/attachments/20150127/b56d2ce4/attachment.html>


More information about the kde-mac mailing list