Review Request 122276: [OS X] use a more representative Display stub typedef

René J.V. Bertin rjvbertin at gmail.com
Sun Feb 1 22:32:09 GMT 2015


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

(Updated Feb. 1, 2015, 11:32 p.m.)


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


Changes
-------

there was another typedef in kstartupinfo.h


Summary (updated)
-----------------

[OS X] use a more representative Display stub typedef


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 (updated)
-----

  kdeui/kernel/kapplication.h fa2ab26 
  kdeui/kernel/kstartupinfo.h ff42263 

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-core-devel/attachments/20150201/b9a8883f/attachment.htm>


More information about the kde-core-devel mailing list