From 95cea6c511ebd7d819adc0188cd56c88957757d3 Mon Sep 17 00:00:00 2001 From: SanthoshKumar Selvaraj Date: Mon, 22 Sep 2025 15:14:52 +0200 Subject: [PATCH] Move the includes outside of the namespace for the 3rdparty yoga source MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The includes within the qt namespace causes build issues in some compilers such as msvc. It would be good to place the includes outside the namespace, and thus the problem can be avoided. Amends patch 918315eac4189ab955f922ffe242351cb0f28b42. Pick-to: 6.10.0 Change-Id: I0902d4a4ca5a80d9ccb102e16d72faa0d79b7604 Reviewed-by: Jan Arve Sæther (cherry picked from commit 59dca51e02187d104ea154fc3e6846c808b97206) Reviewed-by: Qt Cherry-pick Bot --- src/3rdparty/yoga/YGValue.h | 4 ++ ...he-includes-outside-of-the-namespace.patch | 41 +++++++++++++++++++ 2 files changed, 45 insertions(+) create mode 100644 src/3rdparty/yoga/patches/003-Move-the-includes-outside-of-the-namespace.patch diff --git a/src/3rdparty/yoga/YGValue.h b/src/3rdparty/yoga/YGValue.h index 78e1955da2..4f76e7acf4 100644 --- a/src/3rdparty/yoga/YGValue.h +++ b/src/3rdparty/yoga/YGValue.h @@ -25,11 +25,15 @@ YOGA_EXPORT extern const YGValue YGValueZero; YG_EXTERN_C_END +QT_YOGA_NAMESPACE_END + #ifdef __cplusplus #include +QT_YOGA_NAMESPACE_BEGIN constexpr float YGUndefined = std::numeric_limits::quiet_NaN(); #else #include +QT_YOGA_NAMESPACE_BEGIN #define YGUndefined NAN #endif diff --git a/src/3rdparty/yoga/patches/003-Move-the-includes-outside-of-the-namespace.patch b/src/3rdparty/yoga/patches/003-Move-the-includes-outside-of-the-namespace.patch new file mode 100644 index 0000000000..0ddad6dea2 --- /dev/null +++ b/src/3rdparty/yoga/patches/003-Move-the-includes-outside-of-the-namespace.patch @@ -0,0 +1,41 @@ +From d68dbc3bbf593c4c64ca796d15f628131edf2538 Mon Sep 17 00:00:00 2001 +From: SanthoshKumar Selvaraj +Date: Mon, 22 Sep 2025 15:14:52 +0200 +Subject: [PATCH] Move the includes outside of the namespace for the 3rdparty + yoga source + +The includes within the qt namespace causes build issues in some +compilers such as msvc. It would be good to place the includes outside +the namespace, and thus the problem can be avoided. + +Amends patch 918315eac4189ab955f922ffe242351cb0f28b42. + +Pick-to: 6.10 6.10.0 +Change-Id: I0902d4a4ca5a80d9ccb102e16d72faa0d79b7604 +--- + src/3rdparty/yoga/YGValue.h | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/src/3rdparty/yoga/YGValue.h b/src/3rdparty/yoga/YGValue.h +index 78e1955da2..4f76e7acf4 100644 +--- a/src/3rdparty/yoga/YGValue.h ++++ b/src/3rdparty/yoga/YGValue.h +@@ -25,11 +25,15 @@ YOGA_EXPORT extern const YGValue YGValueZero; + + YG_EXTERN_C_END + ++QT_YOGA_NAMESPACE_END ++ + #ifdef __cplusplus + #include ++QT_YOGA_NAMESPACE_BEGIN + constexpr float YGUndefined = std::numeric_limits::quiet_NaN(); + #else + #include ++QT_YOGA_NAMESPACE_BEGIN + #define YGUndefined NAN + #endif + +-- +2.43.0 +