Protect QT_ENABLE_STRICT_MODE_UP_TO against predefined individual opt-outs [6.8]
Since some of the Qt opt-outs are defined project-wide by the
buildsystem these days (e.g. QT_NO_FOREACH, QT_NO_JAVA_STYLE_ITERATOR,
...), a module that attempts to use QT_ENABLE_STRICT_MODE_UP_TO will
hit warnings regarding re-definition of these macros (definition on
the compiler command line, redefinition by qtconfigmacros.h).
To fix, guard the #define QT_NO_FOO's with #ifndef QT_NO_FOO.
Amends 3a6c8e02b6.
Change-Id: I457457d1e60dbd9362b987157ba089adc67d1d6b
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
(cherry picked from commit 0f416cbaaba46ddb039bbf33e1d70dbe80821d57)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit d328e8eaaf96b7a4337169e385bd8c58623028df)
bb10
parent
890469cfea
commit
2babf1e3b1
|
|
@ -182,25 +182,45 @@ namespace QT_NAMESPACE {}
|
|||
#endif
|
||||
|
||||
#if QT_ENABLE_STRICT_MODE_UP_TO >= QT_VERSION_CHECK(6, 0, 0)
|
||||
# ifndef QT_NO_FOREACH
|
||||
# define QT_NO_FOREACH
|
||||
# endif
|
||||
# ifndef QT_NO_CAST_FROM_ASCII
|
||||
# define QT_NO_CAST_FROM_ASCII
|
||||
#endif
|
||||
# ifndef QT_NO_CAST_TO_ASCII
|
||||
# define QT_NO_CAST_TO_ASCII
|
||||
# endif
|
||||
# ifndef QT_NO_CAST_FROM_BYTEARRAY
|
||||
# define QT_NO_CAST_FROM_BYTEARRAY
|
||||
# endif
|
||||
# ifndef QT_NO_URL_CAST_FROM_STRING
|
||||
# define QT_NO_URL_CAST_FROM_STRING
|
||||
# endif
|
||||
# ifndef QT_NO_NARROWING_CONVERSIONS_IN_CONNECT
|
||||
# define QT_NO_NARROWING_CONVERSIONS_IN_CONNECT
|
||||
# endif
|
||||
# ifndef QT_NO_JAVA_STYLE_ITERATORS
|
||||
# define QT_NO_JAVA_STYLE_ITERATORS
|
||||
# endif
|
||||
#endif // 6.0.0
|
||||
|
||||
#if QT_ENABLE_STRICT_MODE_UP_TO >= QT_VERSION_CHECK(6, 6, 0)
|
||||
# ifndef QT_NO_QEXCHANGE
|
||||
# define QT_NO_QEXCHANGE
|
||||
# endif
|
||||
#endif // 6.6.0
|
||||
|
||||
#if QT_ENABLE_STRICT_MODE_UP_TO >= QT_VERSION_CHECK(6, 7, 0)
|
||||
# ifndef QT_NO_CONTEXTLESS_CONNECT
|
||||
# define QT_NO_CONTEXTLESS_CONNECT
|
||||
# endif
|
||||
#endif // 6.7.0
|
||||
|
||||
#if QT_ENABLE_STRICT_MODE_UP_TO >= QT_VERSION_CHECK(6, 8, 0)
|
||||
# ifndef QT_NO_QASCONST
|
||||
# define QT_NO_QASCONST
|
||||
# endif
|
||||
# if !defined(QT_USE_NODISCARD_FILE_OPEN) && !defined(QT_NO_USE_NODISCARD_FILE_OPEN)
|
||||
# define QT_USE_NODISCARD_FILE_OPEN
|
||||
# endif
|
||||
|
|
|
|||
Loading…
Reference in New Issue