• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdelibs API Reference
  • KDE Home
  • Contact Us
 

KDECore

Classes | Macros | Typedefs | Functions
Debug message generators

Classes

class  KDebug::Block
 
class  KDebug
 
struct  KDebugTag
 
class  kndbgstream
 
class  WrongSyntax
 

Macros

#define k_funcinfo   ""
 
#define k_lineinfo   "[" << __FILE__ << ":" << __LINE__ << "] "
 
#define KDE_DEBUG_ENABLED_BY_DEFAULT   true
 
#define KDE_DEFAULT_DEBUG_AREA   0
 
#define kDebug   KDebug(QtDebugMsg, __FILE__, __LINE__, Q_FUNC_INFO)
 
#define KDEBUG_BLOCK   KDebug::Block _kDebugBlock(Q_FUNC_INFO);
 
#define kWarning   KDebug(QtWarningMsg, __FILE__, __LINE__, Q_FUNC_INFO)
 
#define KWARNING_DEPRECATED   kWarning() << "DEPRECATED";
 
#define KWARNING_NOTIMPLEMENTED   kWarning() << "NOT-IMPLEMENTED";
 

Typedefs

typedef QDebug kdbgstream
 
typedef QDebug(* KDebugStreamFunction )(QDebug, KDebugTag)
 

Functions

QString kdBacktrace (int levels=-1)
 
static QDebug kdDebug (int area=KDE_DEFAULT_DEBUG_AREA)
 
static QDebug kDebug (bool cond, int area=KDE_DEFAULT_DEBUG_AREA)
 
QDebug kDebugDevNull ()
 
QDebug kDebugStream (QtMsgType level, int area, const char *file=0, int line=-1, const char *funcinfo=0)
 
static QDebug kdError (int area=KDE_DEFAULT_DEBUG_AREA)
 
static QDebug kdFatal (int area=KDE_DEFAULT_DEBUG_AREA)
 
static QDebug kdWarning (int area=KDE_DEFAULT_DEBUG_AREA)
 
static QDebug kError (bool cond, int area=KDE_DEFAULT_DEBUG_AREA)
 
static QDebug kFatal (bool cond, int area=KDE_DEFAULT_DEBUG_AREA)
 
static QDebug kndDebug ()
 
QString kRealBacktrace (int)
 
static QDebug kWarning (bool cond, int area=KDE_DEFAULT_DEBUG_AREA)
 
QDebug operator<< (QDebug s, KDebugStreamFunction f)
 
QDebug operator<< (QDebug s, const KUrl &url)
 
QDebug operator<< (QDebug s, const KDateTime &time)
 

Detailed Description

KDE debug message streams let you and the user control just how many debug messages you see.

Debug message printing is controlled by (un)defining QT_NO_DEBUG when compiling your source. If QT_NO_DEBUG is defined then debug messages are not printed by default but can still be enabled by runtime configuration, e.g. via kdebugdialog or by editing kdebugrc.

You can also control what you see: process name, area name, method name, file and line number, timestamp, etc. using environment variables. See http://techbase.kde.org/SysAdmin/Environment_Variables#KDE_DEBUG_NOPROCESSINFO

Macro Definition Documentation

#define k_funcinfo   ""

An indicator of where you are in a source file, to be used in warnings (perhaps debug messages too).

Deprecated:
kDebug takes care of printing the method name automatically now

Definition at line 67 of file kdebug.h.

#define k_lineinfo   "[" << __FILE__ << ":" << __LINE__ << "] "

An indicator of where you are in a source file, to be used in warnings (perhaps debug messages too).

Gives an accurate idea of where the message comes from. Not suitable for user-visible messages.

Deprecated:
kDebug takes care of printing the method name automatically now

Definition at line 76 of file kdebug.h.

#define KDE_DEBUG_ENABLED_BY_DEFAULT   true

Definition at line 59 of file kdebug.h.

#define KDE_DEFAULT_DEBUG_AREA   0

Definition at line 121 of file kdebug.h.

#define kDebug   KDebug(QtDebugMsg, __FILE__, __LINE__, Q_FUNC_INFO)

Definition at line 316 of file kdebug.h.

#define KDEBUG_BLOCK   KDebug::Block _kDebugBlock(Q_FUNC_INFO);

Convenience macro for making a standard KDebug::Block.

Definition at line 372 of file kdebug.h.

#define kWarning   KDebug(QtWarningMsg, __FILE__, __LINE__, Q_FUNC_INFO)

Definition at line 322 of file kdebug.h.

#define KWARNING_DEPRECATED   kWarning() << "DEPRECATED";

Convenience macro, use this to alert other developers to stop using a function The function name will appear in the output (unless $KDE_DEBUG_NOMETHODNAME is set)

Since
4.6

Definition at line 399 of file kdebug.h.

#define KWARNING_NOTIMPLEMENTED   kWarning() << "NOT-IMPLEMENTED";

Convenience macro, use this to remind yourself to finish the implementation of a function The function name will appear in the output (unless $KDE_DEBUG_NOMETHODNAME is set)

Since
4.6

Definition at line 392 of file kdebug.h.

Typedef Documentation

typedef QDebug kdbgstream

Definition at line 225 of file kdebug.h.

typedef QDebug(* KDebugStreamFunction)(QDebug, KDebugTag)

!

just a tag class

Definition at line 202 of file kdebug.h.

Function Documentation

QString kdBacktrace ( int  levels = -1)
inline

Definition at line 231 of file kdebug.h.

static QDebug kdDebug ( int  area = KDE_DEFAULT_DEBUG_AREA)
inlinestatic

Definition at line 227 of file kdebug.h.

static QDebug kDebug ( bool  cond,
int  area = KDE_DEFAULT_DEBUG_AREA 
)
inlinestatic

Definition at line 154 of file kdebug.h.

QDebug kDebugDevNull ( )

Returns a debug stream that goes the way of the blackhole.

Definition at line 758 of file kdebug.cpp.

QDebug kDebugStream ( QtMsgType  level,
int  area,
const char *  file = 0,
int  line = -1,
const char *  funcinfo = 0 
)

Returns a debug stream that may or may not output anything.

Definition at line 763 of file kdebug.cpp.

static QDebug kdError ( int  area = KDE_DEFAULT_DEBUG_AREA)
inlinestatic

Definition at line 229 of file kdebug.h.

static QDebug kdFatal ( int  area = KDE_DEFAULT_DEBUG_AREA)
inlinestatic

Definition at line 230 of file kdebug.h.

static QDebug kdWarning ( int  area = KDE_DEFAULT_DEBUG_AREA)
inlinestatic

Definition at line 228 of file kdebug.h.

static QDebug kError ( bool  cond,
int  area = KDE_DEFAULT_DEBUG_AREA 
)
inlinestatic

Definition at line 187 of file kdebug.h.

static QDebug kFatal ( bool  cond,
int  area = KDE_DEFAULT_DEBUG_AREA 
)
inlinestatic

Definition at line 198 of file kdebug.h.

static QDebug kndDebug ( )
inlinestatic

Definition at line 233 of file kdebug.h.

QString kRealBacktrace ( int  )

The actual backtrace.

Definition at line 734 of file kdebug.cpp.

static QDebug kWarning ( bool  cond,
int  area = KDE_DEFAULT_DEBUG_AREA 
)
inlinestatic

Definition at line 171 of file kdebug.h.

QDebug operator<< ( QDebug  s,
KDebugStreamFunction  f 
)
inline

Definition at line 203 of file kdebug.h.

QDebug operator<< ( QDebug  s,
const KUrl &  url 
)

Definition at line 793 of file kdebug.cpp.

QDebug operator<< ( QDebug  s,
const KDateTime &  time 
)

Definition at line 784 of file kdebug.cpp.

This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:47:10 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

KDECore

Skip menu "KDECore"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Modules
  • Related Pages

kdelibs API Reference

Skip menu "kdelibs API Reference"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDEWebKit
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • kio
  • KIOSlave
  • KJS
  •   KJS-API
  • kjsembed
  •   WTF
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUnitConversion
  • KUtils
  • Nepomuk
  • Nepomuk-Core
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal