From 330f8f6d80fe14cc82e3c33c2341c917469ba51e Mon Sep 17 00:00:00 2001 From: Alex Trotsenko Date: Fri, 4 Dec 2015 17:55:24 +0200 Subject: Allow Q_CHECK_PTR when asserts are forced Since the commit 9f83e75d3fbfc01a5ca8d87b4c33ca1ad848387d we can build the release packages with Q_ASSERTs still enabled. As this feature was targeted to embedded platforms it would be nice to enable Q_CHECK_PTR macro as well. Change-Id: I2d549d92b7196935665d927e6aaed3e9f31593b1 Reviewed-by: Thiago Macieira --- src/corelib/global/qglobal.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/corelib/global') diff --git a/src/corelib/global/qglobal.h b/src/corelib/global/qglobal.h index f5a7555f23..128d8abad7 100644 --- a/src/corelib/global/qglobal.h +++ b/src/corelib/global/qglobal.h @@ -754,7 +754,7 @@ Q_CORE_EXPORT void qt_check_pointer(const char *, int); Q_CORE_EXPORT void qBadAlloc(); #ifdef QT_NO_EXCEPTIONS -# if defined(QT_NO_DEBUG) +# if defined(QT_NO_DEBUG) && !defined(QT_FORCE_ASSERTS) # define Q_CHECK_PTR(p) qt_noop() # else # define Q_CHECK_PTR(p) do {if(!(p))qt_check_pointer(__FILE__,__LINE__);} while (0) -- cgit v1.2.3