From f29e92e96c0074a9937508edb01eafdbda62ea11 Mon Sep 17 00:00:00 2001 From: Harald Fernengel Date: Wed, 11 Jan 2012 13:27:12 +0100 Subject: Fix Q_ASSERT_X to handle QT_FORCE_ASSERTS This change aligns the behavior of Q_ASSERT and Q_ASSERT_X Change-Id: Iac9f399da6462fcf70826d3ce1177522bed9f897 Reviewed-by: Roberto Raggi --- src/corelib/global/qglobal.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/corelib/global/qglobal.h b/src/corelib/global/qglobal.h index 1d924e840d..7b4b8772c3 100644 --- a/src/corelib/global/qglobal.h +++ b/src/corelib/global/qglobal.h @@ -1740,10 +1740,10 @@ Q_CORE_EXPORT void qt_assert(const char *assertion, const char *file, int line); Q_CORE_EXPORT void qt_assert_x(const char *where, const char *what, const char *file, int line); #if !defined(Q_ASSERT_X) -# ifndef QT_NO_DEBUG -# define Q_ASSERT_X(cond, where, what) ((!(cond)) ? qt_assert_x(where, what,__FILE__,__LINE__) : qt_noop()) -# else +# if defined(QT_NO_DEBUG) && !defined(QT_FORCE_ASSERTS) # define Q_ASSERT_X(cond, where, what) qt_noop() +# else +# define Q_ASSERT_X(cond, where, what) ((!(cond)) ? qt_assert_x(where, what,__FILE__,__LINE__) : qt_noop()) # endif #endif -- cgit v1.2.3