From 4601717378fb6822226cf4ad1e5e52960bf0a773 Mon Sep 17 00:00:00 2001 From: Ivan Solovev Date: Tue, 18 Jul 2023 11:01:04 +0200 Subject: [PATCH] Guard xmlstream header in a source-compatible way Using QT_REQUIRE_CONFIG results in a static_assert if the xmlstream feature is not available. This is a SiC change, as the user has no reasonable ways to guard against it. Fix it by using if QT_CONFIG(xmlstream) instead. This commit amends 7337474d041d7e4a7a33157ebd7d84406ed13966 Pick-to: 6.6 Change-Id: I0c55e4cff06157743c05a543a092f9be1eb67c2d Reviewed-by: Edward Welbourne Reviewed-by: Marc Mutz --- src/corelib/serialization/qxmlstream.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/corelib/serialization/qxmlstream.h b/src/corelib/serialization/qxmlstream.h index c4579bf905..e6dd25117a 100644 --- a/src/corelib/serialization/qxmlstream.h +++ b/src/corelib/serialization/qxmlstream.h @@ -6,7 +6,7 @@ #include -QT_REQUIRE_CONFIG(xmlstream); +#if QT_CONFIG(xmlstream) #include #include @@ -418,4 +418,6 @@ private: QT_END_NAMESPACE +#endif // feature xmlstream + #endif // QXMLSTREAM_H