From 3c7b870f367df150ea60eb9d6bb2fd41646545d7 Mon Sep 17 00:00:00 2001 From: tpearson Date: Wed, 3 Feb 2010 01:26:04 +0000 Subject: Added abandoned Filelight application git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/filelight@1084392 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- src/part/debug.h | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 src/part/debug.h (limited to 'src/part/debug.h') diff --git a/src/part/debug.h b/src/part/debug.h new file mode 100644 index 0000000..e5e680b --- /dev/null +++ b/src/part/debug.h @@ -0,0 +1,36 @@ +//Author: Max Howell , (C) 2003-4 +//Copyright: See COPYING file that comes with this distribution + +#ifndef DEBUG_H +#define DEBUG_H + +/** Fancy debug header + * @author Max Howell + * + * Define DEBUG_PREFIX as a string before you include this to insert a fancy debug prefix + * Debug::debug(), can be used as debug() and is just kdDebug() + * use Debug::indent() and Debug::unindent() + */ + +#include + +#ifdef NDEBUG +static inline kndbgstream debug() { return kndbgstream(); } +#else +static inline kdbgstream debug() +{ + return kdbgstream( + #ifdef DEBUG_PREFIX + "[" DEBUG_PREFIX "] ", + #endif + 0, 0 ); +} +#endif + +#define error kdError +#define fatal kdFatal +#define warning kdWarning + +#define DEBUG_ANNOUNCE debug() << ">> " << __PRETTY_FUNCTION__ << endl; + +#endif -- cgit v1.2.1