diff options
author | Sona Kurazyan <sona.kurazyan@qt.io> | 2022-08-16 10:42:28 +0200 |
---|---|---|
committer | Sona Kurazyan <sona.kurazyan@qt.io> | 2022-08-19 14:19:28 +0200 |
commit | d773fbe0dc1a32ad26fb331f4319aa8c01502f15 (patch) | |
tree | 4cbc380222d495a7bf4daaccba4c0acf1e816995 /src/corelib/global/qglobal.h | |
parent | c201c5aedfcb131d2ac829346812560509904c7d (diff) |
Move warning suppression macros from qglobal.h to qcompilerdetection.h
Task-number: QTBUG-99313
Change-Id: I54f1c48591b448a7b697720018e565a8c865a18b
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/corelib/global/qglobal.h')
-rw-r--r-- | src/corelib/global/qglobal.h | 14 |
1 files changed, 0 insertions, 14 deletions
diff --git a/src/corelib/global/qglobal.h b/src/corelib/global/qglobal.h index 4329f9f093..3815f75de5 100644 --- a/src/corelib/global/qglobal.h +++ b/src/corelib/global/qglobal.h @@ -250,22 +250,8 @@ constexpr std::underlying_type_t<Enum> qToUnderlying(Enum e) noexcept return static_cast<std::underlying_type_t<Enum>>(e); } -// The body must be a statement: -#define Q_CAST_IGNORE_ALIGN(body) QT_WARNING_PUSH QT_WARNING_DISABLE_GCC("-Wcast-align") body QT_WARNING_POP - #define QT_MODULE(x) -// This macro can be used to calculate member offsets for types with a non standard layout. -// It uses the fact that offsetof() is allowed to support those types since C++17 as an optional -// feature. All our compilers do support this, but some issue a warning, so we wrap the offsetof() -// call in a macro that disables the compiler warning. -#define Q_OFFSETOF(Class, member) \ - []() -> size_t { \ - QT_WARNING_PUSH QT_WARNING_DISABLE_INVALID_OFFSETOF \ - return offsetof(Class, member); \ - QT_WARNING_POP \ - }() - QT_END_NAMESPACE // We need to keep QTypeInfo, QSysInfo, QFlags, qDebug & family in qglobal.h for compatibility with Qt 4. |