1#ifndef __KMAIL_KMDEBUG_H__
2#define __KMAIL_KMDEBUG_H__
11# define kmail_dbgstream kndbgstream
13# define kmail_dbgstream kdbgstream
17static const int kmail_debug_area = 5006;
19static inline kmail_dbgstream kmDebug() {
return kdDebug( kmail_debug_area ); }
20static inline kmail_dbgstream kmDebug(
bool cond ) {
return kdDebug( cond, kmail_debug_area ); }
22static inline kdbgstream kmWarning() {
return kdWarning( kmail_debug_area ); }
23static inline kdbgstream kmWarning(
bool cond ) {
return kdWarning( cond, kmail_debug_area ); }
25static inline kdbgstream kmError() {
return kdError( kmail_debug_area ); }
26static inline kdbgstream kmError(
bool cond ) {
return kdError( cond, kmail_debug_area ); }
28static inline kdbgstream kmFatal() {
return kdFatal( kmail_debug_area ); }
29static inline kdbgstream kmFatal(
bool cond ) {
return kdFatal( cond, kmail_debug_area ); }
32#if !defined( NDEBUG ) && defined( DEBUG_TIMING )
33#include <tqdatetime.h>
34#define CREATE_TIMER(x) int x=0, x ## _tmp=0; TQTime x ## _tmp2
35#define START_TIMER(x) x ## _tmp2 = TQTime::currentTime()
36#define GRAB_TIMER(x) x ## _tmp2.msecsTo(TQTime::currentTime())
37#define END_TIMER(x) x += GRAB_TIMER(x); x ## _tmp++
38#define SHOW_TIMER(x) kdDebug(5006) << #x " == " << x << "(" << x ## _tmp << ")\n"
40#define CREATE_TIMER(x)
49#define CREATE_COUNTER(x) int x ## _cnt=0
50#define RESET_COUNTER(x) x ## _cnt=0
51#define INC_COUNTER(x) x ## _cnt++
52#define SHOW_COUNTER(x) kdDebug(5006) << #x " == " << x ## _cnt << endl
54#define CREATE_COUNTER(x)
55#define RESET_COUNTER(x)
57#define SHOW_COUNTER(x)