diff options
author | Harald Fernengel <harald.fernengel@nokia.com> | 2011-11-11 11:21:52 +0100 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2011-11-11 12:24:48 +0100 |
commit | 6a25a86d375b03805686e82dbe9e9974f92bf5dd (patch) | |
tree | 7ec42355f5f9b917cb1bfe25ca4f0fb529c72365 /src/corelib/global/qglobal.h | |
parent | 999196e3369417969d4a561710d68c8bb1786c47 (diff) |
Add a -force-asserts option to configure
We have the following scenario: Either you build a release package
without asserts, or a debug package with asserts. However, in embedded
development, we need asserts also in release packages. This flag allows
you to build a release package, but Q_ASSERTs still fire.
Change-Id: Icd1dd4dd63c3cafecf515b40741263d902ad42d1
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/corelib/global/qglobal.h')
-rw-r--r-- | src/corelib/global/qglobal.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/corelib/global/qglobal.h b/src/corelib/global/qglobal.h index 2b44d708ea..714e120db6 100644 --- a/src/corelib/global/qglobal.h +++ b/src/corelib/global/qglobal.h @@ -1706,10 +1706,10 @@ inline QNoDebug qDebug(); Q_CORE_EXPORT void qt_assert(const char *assertion, const char *file, int line); #if !defined(Q_ASSERT) -# ifndef QT_NO_DEBUG -# define Q_ASSERT(cond) ((!(cond)) ? qt_assert(#cond,__FILE__,__LINE__) : qt_noop()) -# else +# if defined(QT_NO_DEBUG) && !defined(QT_FORCE_ASSERTS) # define Q_ASSERT(cond) qt_noop() +# else +# define Q_ASSERT(cond) ((!(cond)) ? qt_assert(#cond,__FILE__,__LINE__) : qt_noop()) # endif #endif |