summaryrefslogtreecommitdiff
path: root/src/rekonq_defines.h
diff options
context:
space:
mode:
authorPierre Rossi <pierre.rossi@gmail.com>2011-07-28 11:04:07 +0200
committerAndrea Diamantini <adjam7@gmail.com>2011-07-28 11:04:07 +0200
commite9770b468474dbb1e2774d76b5309d729f35f4b8 (patch)
tree04c1056aa45f8e823ba398efbf68a3c99208fc58 /src/rekonq_defines.h
parentMerge branch 'HOOKS' (diff)
downloadrekonq-e9770b468474dbb1e2774d76b5309d729f35f4b8.tar.xz
Introducing ASSERT_NOT_REACHED
In a similar fashion as WebKit, this might make those cases where we don't expect to go more obvious in debug builds. I also took the liberty to revisit a lot of switch statements but it could potentially be used elsewhere Reviewed-by: andrea
Diffstat (limited to 'src/rekonq_defines.h')
-rw-r--r--src/rekonq_defines.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/rekonq_defines.h b/src/rekonq_defines.h
index fd0d1e25..bd11c24e 100644
--- a/src/rekonq_defines.h
+++ b/src/rekonq_defines.h
@@ -51,7 +51,13 @@
#define QL1S(x) QLatin1String(x)
#define QL1C(x) QLatin1Char(x)
-
+#ifndef ASSERT_NOT_REACHED
+# ifndef QT_NO_DEBUG
+# define ASSERT_NOT_REACHED(msg) qt_assert(#msg,__FILE__,__LINE__); kDebug() << #msg
+# else
+# define ASSERT_NOT_REACHED(msg) kDebug() << #msg
+# endif
+#endif //ASSERT_NOT_REACHED
// ----------------------------------------------------------------------------------------------------
// ENUMS