summaryrefslogtreecommitdiff
path: root/src/libs/utils/qtcassert.h
diff options
context:
space:
mode:
authorKai Koehne <kai.koehne@nokia.com>2011-07-29 12:00:11 +0200
committerKai Koehne <kai.koehne@nokia.com>2011-07-29 12:19:11 +0200
commit1757228278004b56fcf3ff5f3fccd80216b7df2d (patch)
treee546475fe7a9f32ce23b6b157b666b6220c25faf /src/libs/utils/qtcassert.h
parentc031d4564e2a9cba04cc9d15b7e197251a2d79f7 (diff)
downloadqt-creator-1757228278004b56fcf3ff5f3fccd80216b7df2d.tar.gz
New QTC_CHECK warning replacing QTC_ASSERT(x, /**/)
Warn if the condition fails, but otherwise don't change the execution flow. Change-Id: Id7b14c745109b66960add967b2a4ef8d31e1a546 Reviewed-on: http://codereview.qt.nokia.com/2389 Reviewed-by: Eike Ziller <eike.ziller@nokia.com>
Diffstat (limited to 'src/libs/utils/qtcassert.h')
-rw-r--r--src/libs/utils/qtcassert.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/libs/utils/qtcassert.h b/src/libs/utils/qtcassert.h
index 5d2eb1ac70..c33581b76b 100644
--- a/src/libs/utils/qtcassert.h
+++ b/src/libs/utils/qtcassert.h
@@ -44,5 +44,8 @@
#define QTC_ASSERT(cond, action) \
if(cond){}else{qDebug()<<"ASSERTION " #cond " FAILED AT " __FILE__ ":" QTC_ASSERT_STRINGIFY(__LINE__);action;}
+#define QTC_CHECK(cond) \
+ if(cond){}else{qDebug()<<"ASSERTION " #cond " FAILED AT " __FILE__ ":" QTC_ASSERT_STRINGIFY(__LINE__);}
+
#endif // QTC_ASSERT_H