summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHarald Fernengel <harald.fernengel@nokia.com>2012-01-11 13:27:12 +0100
committerQt by Nokia <qt-info@nokia.com>2012-01-11 15:48:07 +0100
commitf29e92e96c0074a9937508edb01eafdbda62ea11 (patch)
treee3d1f7a91474a174e68e004d9f6a6adad5edaba5
parent8ae55a3484c0811cb975572dea396b978a54836b (diff)
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 <roberto.raggi@nokia.com>
-rw-r--r--src/corelib/global/qglobal.h6
1 files 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