diff options
author | Ivan Solovev <ivan.solovev@qt.io> | 2023-07-18 11:01:04 +0200 |
---|---|---|
committer | Ivan Solovev <ivan.solovev@qt.io> | 2023-07-19 11:56:52 +0200 |
commit | 4601717378fb6822226cf4ad1e5e52960bf0a773 (patch) | |
tree | faae8f05b9ee5316fde7efe50bac7ed12d1755fc /src/corelib/serialization | |
parent | 7c2ecfcf2970cdce8aef043deb38aabdc3baffd8 (diff) |
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 <edward.welbourne@qt.io>
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Diffstat (limited to 'src/corelib/serialization')
-rw-r--r-- | src/corelib/serialization/qxmlstream.h | 4 |
1 files changed, 3 insertions, 1 deletions
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 <QtCore/qiodevice.h> -QT_REQUIRE_CONFIG(xmlstream); +#if QT_CONFIG(xmlstream) #include <QtCore/qlist.h> #include <QtCore/qscopedpointer.h> @@ -418,4 +418,6 @@ private: QT_END_NAMESPACE +#endif // feature xmlstream + #endif // QXMLSTREAM_H |