summaryrefslogtreecommitdiffstats
path: root/src/widgets
diff options
context:
space:
mode:
authorMarc Mutz <marc.mutz@qt.io>2023-05-09 16:21:08 +0200
committerMarc Mutz <marc.mutz@qt.io>2023-05-10 12:00:28 +0200
commitad398b2df6a686791165661b0fd5b83c5a69a8cd (patch)
treef94f35cedb36156d7f53db21068cfb9376f995da /src/widgets
parent3efefcceba59d570a13b1a7de32a0e8caaf74aee (diff)
QStyleSheetStyle: fix unity-build with chunk-size 13
The definition of ceil() as a function-style preprocessor macro appears to clash with the definiton of QFixed::ceil(), included later. That's an educated guess, though, because the error is completely different: qstylesheetstyle.cpp:141:19: error: expected unqualified-id before ‘int’ 141 | #define ceil(x) ((int)(x) + ((x) > 0 && (x) != (int)(x))) | ^~~ qstylesheetstyle.cpp:141:19: note: in definition of macro ‘ceil’ 141 | #define ceil(x) ((int)(x) + ((x) > 0 && (x) != (int)(x))) | ^~~ qstylesheetstyle.cpp:141:19: error: expected ‘)’ before ‘int’ 141 | #define ceil(x) ((int)(x) + ((x) > 0 && (x) != (int)(x))) | ~^~~ qstylesheetstyle.cpp:141:19: note: in definition of macro ‘ceil’ 141 | #define ceil(x) ((int)(x) + ((x) > 0 && (x) != (int)(x))) | ^~~ qstylesheetstyle.cpp:141:19: error: expected ‘)’ before ‘int’ 141 | #define ceil(x) ((int)(x) + ((x) > 0 && (x) != (int)(x))) | ~ ^~~ qstylesheetstyle.cpp:141:19: note: in definition of macro ‘ceil’ 141 | #define ceil(x) ((int)(x) + ((x) > 0 && (x) != (int)(x))) | ^~~ Fix by #undef'ing at the end of the TU. This is a minimal fix, suitable for backporting to older branches. A more modern fix will be forthcoming as a follow-up patch. Pick-to: 6.5 6.2 Change-Id: I8c1b6c7834e55b2bf28044a78ddf5bb544b23c65 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Amir Masoud Abdol <amir.abdol@qt.io> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Diffstat (limited to 'src/widgets')
-rw-r--r--src/widgets/styles/qstylesheetstyle.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/widgets/styles/qstylesheetstyle.cpp b/src/widgets/styles/qstylesheetstyle.cpp
index 6ae6d18177..0b58044cc3 100644
--- a/src/widgets/styles/qstylesheetstyle.cpp
+++ b/src/widgets/styles/qstylesheetstyle.cpp
@@ -6490,6 +6490,8 @@ QPixmap QStyleSheetStyle::loadPixmap(const QString &fileName, const QObject *con
return pixmap;
}
+#undef ceil
+
QT_END_NAMESPACE
#include "moc_qstylesheetstyle_p.cpp"