From cdd1596f2d8e80f5feb69219c2507e3f07350ac0 Mon Sep 17 00:00:00 2001
From: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Date: Thu, 7 May 2009 12:11:48 +0200
Subject: [PATCH] nicer QTC_ASSERT output

---
 src/libs/utils/qtcassert.h | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/src/libs/utils/qtcassert.h b/src/libs/utils/qtcassert.h
index 3d9090be33e..de22d96d9f3 100644
--- a/src/libs/utils/qtcassert.h
+++ b/src/libs/utils/qtcassert.h
@@ -32,11 +32,14 @@
 
 #include <QtCore/QDebug>
 
+#define QTC_ASSERT_STRINGIFY_INTERNAL(x) #x
+#define QTC_ASSERT_STRINGIFY(x) QTC_ASSERT_STRINGIFY_INTERNAL(x)
+
 // we do not use the  'do {...} while (0)' idiom here to be able to use
 // 'break' and 'continue' as 'actions'.
 
 #define QTC_ASSERT(cond, action) \
-    if(cond){}else{qDebug()<<"ASSERTION"<<#cond<<"FAILED"<<__FILE__<<__LINE__;action;}
+    if(cond){}else{qDebug()<<"ASSERTION " #cond " FAILED AT " __FILE__ ":" QTC_ASSERT_STRINGIFY(__LINE__);action;}
 
 #endif // QTC_ASSERT_H
 
-- 
GitLab