diff options
author | Sona Kurazyan <sona.kurazyan@qt.io> | 2022-08-01 15:09:42 +0200 |
---|---|---|
committer | Sona Kurazyan <sona.kurazyan@qt.io> | 2022-08-05 15:54:06 +0200 |
commit | b3fd4b8adf929923b33295fa03783bcdbebe442f (patch) | |
tree | 63943fa4dd8af87ae2fc5cbabb43c8042c4ad6e6 /src/corelib/global/qglobal.h | |
parent | f9c73e540a0a4a7dcd7dbf0a172b119f16ed7e5f (diff) |
Extract header qassert.h from qglobal.h
For now qassert.h is included in the middle of qglobal.h, since some of
the code below needs it, but this will be cleaned up when that code is
moved in its own header.
Task-number: QTBUG-99313
Change-Id: I2cdfed44f5c8772c1dad4797cf8edc6cb4c964b4
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Diffstat (limited to 'src/corelib/global/qglobal.h')
-rw-r--r-- | src/corelib/global/qglobal.h | 30 |
1 files changed, 3 insertions, 27 deletions
diff --git a/src/corelib/global/qglobal.h b/src/corelib/global/qglobal.h index 9d482e7107..93954a4826 100644 --- a/src/corelib/global/qglobal.h +++ b/src/corelib/global/qglobal.h @@ -633,33 +633,9 @@ Q_CORE_EXPORT Q_DECL_CONST_FUNCTION bool qSharedBuild() noexcept; # define QT_DEBUG #endif -#ifndef Q_CC_MSVC -Q_NORETURN -#endif -Q_DECL_COLD_FUNCTION -Q_CORE_EXPORT void qt_assert(const char *assertion, const char *file, int line) noexcept; - -#if !defined(Q_ASSERT) -# if defined(QT_NO_DEBUG) && !defined(QT_FORCE_ASSERTS) -# define Q_ASSERT(cond) static_cast<void>(false && (cond)) -# else -# define Q_ASSERT(cond) ((cond) ? static_cast<void>(0) : qt_assert(#cond, __FILE__, __LINE__)) -# endif -#endif - -#ifndef Q_CC_MSVC -Q_NORETURN -#endif -Q_DECL_COLD_FUNCTION -Q_CORE_EXPORT void qt_assert_x(const char *where, const char *what, const char *file, int line) noexcept; - -#if !defined(Q_ASSERT_X) -# if defined(QT_NO_DEBUG) && !defined(QT_FORCE_ASSERTS) -# define Q_ASSERT_X(cond, where, what) static_cast<void>(false && (cond)) -# else -# define Q_ASSERT_X(cond, where, what) ((cond) ? static_cast<void>(0) : qt_assert_x(where, what, __FILE__, __LINE__)) -# endif -#endif +QT_BEGIN_INCLUDE_NAMESPACE +#include <QtCore/qassert.h> +QT_END_INCLUDE_NAMESPACE Q_NORETURN Q_CORE_EXPORT void qt_check_pointer(const char *, int) noexcept; Q_NORETURN Q_DECL_COLD_FUNCTION |