From ef27cc126c38ff14360bebeeb3100671df9e4cf4 Mon Sep 17 00:00:00 2001 From: Alexey Edelev Date: Wed, 5 Apr 2023 14:33:09 +0200 Subject: [PATCH] Guard qopenglcontext_p.h with the QT_NO_OPENGL check QtGui/private/qopenglcontext_p.h needs to be guarded to avoid compilation errors when building Qt with openGL disabled. Fixes: QTBUG-112656 Pick-to: 6.5 Change-Id: I21d120ed2bdb22e7aa2338e396a9a426adb80dbe Reviewed-by: Alexandru Croitor Reviewed-by: Qt CI Bot --- src/gui/platform/macos/qcocoanativeinterface.mm | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/gui/platform/macos/qcocoanativeinterface.mm b/src/gui/platform/macos/qcocoanativeinterface.mm index a41f9b16da..58c19c7781 100644 --- a/src/gui/platform/macos/qcocoanativeinterface.mm +++ b/src/gui/platform/macos/qcocoanativeinterface.mm @@ -1,7 +1,10 @@ // Copyright (C) 2020 The Qt Company Ltd. // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only -#include +#ifndef QT_NO_OPENGL +# include +#endif + #include #include #include