diff options
author | Thiago Macieira <thiago.macieira@intel.com> | 2018-07-04 23:17:16 -0700 |
---|---|---|
committer | Thiago Macieira <thiago.macieira@intel.com> | 2018-07-11 19:18:38 +0000 |
commit | 89f7e090efe1c5f0df627f83492174a0f4e47e32 (patch) | |
tree | c0d370e81c8b11c8414bedd82bd0e7e4632c9a25 /src/plugins/platforms/xcb/nativepainting | |
parent | abbd28f551a128cc0959b8c6ba25ac6a2f821217 (diff) |
XCB/Xlib: make sure we don't get problems for sys headers using register
Found while compiling on FreeBSD 11.2 (clang 6 update has the warning):
/usr/local/include/X11/Xlibint.h:675:7: error: ISO C++17 does not allow 'register' storage class specifier [-Wregister]
Change-Id: I117816bf0f5e469b8d34fffd153e6482ccaed69f
Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
Diffstat (limited to 'src/plugins/platforms/xcb/nativepainting')
-rw-r--r-- | src/plugins/platforms/xcb/nativepainting/qbackingstore_x11.cpp | 2 | ||||
-rw-r--r-- | src/plugins/platforms/xcb/nativepainting/qt_x11_p.h | 2 |
2 files changed, 4 insertions, 0 deletions
diff --git a/src/plugins/platforms/xcb/nativepainting/qbackingstore_x11.cpp b/src/plugins/platforms/xcb/nativepainting/qbackingstore_x11.cpp index 9b31998620..8851ea59e5 100644 --- a/src/plugins/platforms/xcb/nativepainting/qbackingstore_x11.cpp +++ b/src/plugins/platforms/xcb/nativepainting/qbackingstore_x11.cpp @@ -48,7 +48,9 @@ # include <X11/extensions/Xrender.h> #endif +#define register /* C++17 deprecated register */ #include <X11/Xlib.h> +#undef register #ifndef None #define None 0L diff --git a/src/plugins/platforms/xcb/nativepainting/qt_x11_p.h b/src/plugins/platforms/xcb/nativepainting/qt_x11_p.h index aa8dfa5af0..a13a8f0483 100644 --- a/src/plugins/platforms/xcb/nativepainting/qt_x11_p.h +++ b/src/plugins/platforms/xcb/nativepainting/qt_x11_p.h @@ -40,8 +40,10 @@ #ifndef QT_X11_P_H #define QT_X11_P_H +#define register /* C++17 deprecated register */ #include <X11/Xlib.h> #include <X11/Xatom.h> +#undef register #if QT_CONFIG(xrender) # include "qtessellator_p.h" |