From 11be4c5ce801c870081387e40dfbd813e299f34d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Storsj=C3=B6?= Date: Thu, 29 Sep 2022 10:39:07 +0300 Subject: [PATCH] Fix building with disabled OpenGL after switching to the syncqt tool After switching qtbase to use the syncqt tool (in b89d63515bb352cecfd87e709320a2db5b6a1906), these OpenGL specific headers aren't available at all, when the build is configured to not use OpenGL. In one case, add a missing check for QT_NO_OPENGL, and in another case, include the necessary header to make the potential QT_NO_OPENGL define available, to make a preexisting ifdef actually do what it was meant to do. Change-Id: Ie12deff2eee8e3b59193175551fbb28b7480f1f8 Reviewed-by: Alexey Edelev --- src/plugins/platforms/windows/qwindowsintegration.h | 2 ++ src/plugins/platforms/windows/qwindowsopengltester.cpp | 1 + 2 files changed, 3 insertions(+) diff --git a/src/plugins/platforms/windows/qwindowsintegration.h b/src/plugins/platforms/windows/qwindowsintegration.h index 265ef719a62..4391208374a 100644 --- a/src/plugins/platforms/windows/qwindowsintegration.h +++ b/src/plugins/platforms/windows/qwindowsintegration.h @@ -10,7 +10,9 @@ #include #include #include +#ifndef QT_NO_OPENGL #include +#endif #include QT_BEGIN_NAMESPACE diff --git a/src/plugins/platforms/windows/qwindowsopengltester.cpp b/src/plugins/platforms/windows/qwindowsopengltester.cpp index 19b60a4542a..6a790bcc1bc 100644 --- a/src/plugins/platforms/windows/qwindowsopengltester.cpp +++ b/src/plugins/platforms/windows/qwindowsopengltester.cpp @@ -15,6 +15,7 @@ #include #include #include +#include #ifndef QT_NO_OPENGL #include