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. 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> (cherry picked from commit ad398b2df6a686791165661b0fd5b83c5a69a8cd) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
parent
fac51d52d2
commit
bf88899b7e
@ -6500,6 +6500,8 @@ QPixmap QStyleSheetStyle::loadPixmap(const QString &fileName, const QObject *con
|
||||
return pixmap;
|
||||
}
|
||||
|
||||
#undef ceil
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
#include "moc_qstylesheetstyle_p.cpp"
|
||||
|
Loading…
x
Reference in New Issue
Block a user