diff options
author | Giuseppe D'Angelo <[email protected]> | 2025-05-30 11:46:36 +0200 |
---|---|---|
committer | Giuseppe D'Angelo <[email protected]> | 2025-05-30 19:34:59 +0200 |
commit | 89ec9276fc96569172bf74181dd92bbb20453dd7 (patch) | |
tree | 47b7b79d64033dc38974bf951573259c1c8ae19e | |
parent | f6126ccb1ccb0c0d87dfd36da22daf403ef1f445 (diff) |
Including egl.h may transitively include X headers which define a bunch
of macros that clash against our code. Undef these macros just after EGL
is included. This was already done locally in eglfs, but the same
problem appears in any code that uses qt_egl_p.h, like the Wayland
platform plugin.
Change-Id: I2fbd617f57de6ae7366795aabacd81c639903699
Reviewed-by: Tor Arne Vestbø <[email protected]>
-rw-r--r-- | src/gui/opengl/platform/egl/qt_egl_p.h | 14 | ||||
-rw-r--r-- | src/plugins/platforms/eglfs/api/qeglfsglobal_p.h | 12 |
2 files changed, 14 insertions, 12 deletions
diff --git a/src/gui/opengl/platform/egl/qt_egl_p.h b/src/gui/opengl/platform/egl/qt_egl_p.h index 1f538e22af7..52ecdf3f8ec 100644 --- a/src/gui/opengl/platform/egl/qt_egl_p.h +++ b/src/gui/opengl/platform/egl/qt_egl_p.h @@ -43,6 +43,20 @@ #include <EGL/egl.h> #include <EGL/eglext.h> +#ifndef QT_EGL_NO_X11 +#undef Status +#undef None +#undef Bool +#undef CursorShape +#undef KeyPress +#undef KeyRelease +#undef FocusIn +#undef FocusOut +#undef FontChange +#undef Expose +#undef Unsorted +#endif + #include <stdint.h> QT_BEGIN_NAMESPACE diff --git a/src/plugins/platforms/eglfs/api/qeglfsglobal_p.h b/src/plugins/platforms/eglfs/api/qeglfsglobal_p.h index 488675dbf11..b702fb2ee9c 100644 --- a/src/plugins/platforms/eglfs/api/qeglfsglobal_p.h +++ b/src/plugins/platforms/eglfs/api/qeglfsglobal_p.h @@ -27,18 +27,6 @@ QT_BEGIN_NAMESPACE #define Q_EGLFS_EXPORT Q_DECL_IMPORT #endif -#undef Status -#undef None -#undef Bool -#undef CursorShape -#undef KeyPress -#undef KeyRelease -#undef FocusIn -#undef FocusOut -#undef FontChange -#undef Expose -#undef Unsorted - QT_END_NAMESPACE #endif |