From 997254877c4cb7433715af52bb8ddfb490e55322 Mon Sep 17 00:00:00 2001 From: Daljit Singh Date: Wed, 30 Oct 2024 11:29:14 +0000 Subject: [PATCH] Partially turn off clang-format for in cpp/gui/shapes headers We ensure that glutils.h is included prior to gl_core_3_3.h since it indirectly includes Qt's OpenGL headers (which breaks the build). --- cpp/gui/shapes/cube.h | 4 ++++ cpp/gui/shapes/cylinder.h | 4 ++++ cpp/gui/shapes/halfsphere.h | 4 ++++ cpp/gui/shapes/sphere.h | 4 ++++ 4 files changed, 16 insertions(+) diff --git a/cpp/gui/shapes/cube.h b/cpp/gui/shapes/cube.h index e988bb7c5a..31acf17ea0 100644 --- a/cpp/gui/shapes/cube.h +++ b/cpp/gui/shapes/cube.h @@ -16,8 +16,12 @@ #pragma once +// glutils.h must be included before gl_core_3_3.h since it include Qt OpenGL headers +// which must be included before gl_core_3_3.h +// clang-format off #include "opengl/glutils.h" #include "opengl/gl_core_3_3.h" +// clang-format on namespace MR::GUI::Shapes { diff --git a/cpp/gui/shapes/cylinder.h b/cpp/gui/shapes/cylinder.h index c1a7c6d464..064f4d9fda 100644 --- a/cpp/gui/shapes/cylinder.h +++ b/cpp/gui/shapes/cylinder.h @@ -16,8 +16,12 @@ #pragma once +// glutils.h must be included before gl_core_3_3.h since it include Qt OpenGL headers +// which must be included before gl_core_3_3.h +// clang-format off #include "opengl/glutils.h" #include "opengl/gl_core_3_3.h" +// clang-format on namespace MR::GUI::Shapes { diff --git a/cpp/gui/shapes/halfsphere.h b/cpp/gui/shapes/halfsphere.h index 9e19490474..2781409a18 100644 --- a/cpp/gui/shapes/halfsphere.h +++ b/cpp/gui/shapes/halfsphere.h @@ -18,8 +18,12 @@ #include "types.h" +// glutils.h must be included before gl_core_3_3.h since it include Qt OpenGL headers +// which must be included before gl_core_3_3.h +// clang-format off #include "opengl/glutils.h" #include "opengl/gl_core_3_3.h" +// clang-format on namespace MR::GUI::Shapes { diff --git a/cpp/gui/shapes/sphere.h b/cpp/gui/shapes/sphere.h index f770f03ffc..ddbca63f9b 100644 --- a/cpp/gui/shapes/sphere.h +++ b/cpp/gui/shapes/sphere.h @@ -18,8 +18,12 @@ #include "types.h" +// glutils.h must be included before gl_core_3_3.h since it include Qt OpenGL headers +// which must be included before gl_core_3_3.h +// clang-format off #include "opengl/glutils.h" #include "opengl/gl_core_3_3.h" +// clang-format on namespace MR::GUI::Shapes {