diff options
author | Pierre Rossi <pierre.rossi@gmail.com> | 2011-07-28 11:04:07 +0200 |
---|---|---|
committer | Andrea Diamantini <adjam7@gmail.com> | 2011-07-28 11:04:07 +0200 |
commit | e9770b468474dbb1e2774d76b5309d729f35f4b8 (patch) | |
tree | 04c1056aa45f8e823ba398efbf68a3c99208fc58 /src/rekonq_defines.h | |
parent | Merge branch 'HOOKS' (diff) | |
download | rekonq-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.h | 8 |
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 |