KDELibs4Support

Debug message generators

Classes

class  KDebug::Block
 
class  KDebug
 

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

KDELIBS4SUPPORT_DEPRECATED_NOISE QString kdBacktrace (int levels=-1)
 
static KDELIBS4SUPPORT_DEPRECATED_NOISE QDebug kdDebug (int area=KDE_DEFAULT_DEBUG_AREA)
 
static QDebug kDebug (bool cond, int area=KDE_DEFAULT_DEBUG_AREA)
 
KDELIBS4SUPPORT_DEPRECATED_EXPORT_NOISE QDebug kDebugDevNull ()
 
KDELIBS4SUPPORT_DEPRECATED_EXPORT_NOISE QDebug kDebugStream (QtMsgType level, int area, const char *file=nullptr, int line=-1, const char *funcinfo=nullptr)
 
static KDELIBS4SUPPORT_DEPRECATED_NOISE QDebug kdError (int area=KDE_DEFAULT_DEBUG_AREA)
 
static KDELIBS4SUPPORT_DEPRECATED_NOISE QDebug kdFatal (int area=KDE_DEFAULT_DEBUG_AREA)
 
static KDELIBS4SUPPORT_DEPRECATED_NOISE 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 KDELIBS4SUPPORT_DEPRECATED_NOISE QDebug kndDebug ()
 
KDELIBS4SUPPORT_DEPRECATED_EXPORT_NOISE QString kRealBacktrace (int)
 
static QDebug kWarning (bool cond, int area=KDE_DEFAULT_DEBUG_AREA)
 
KDELIBS4SUPPORT_DEPRECATED_EXPORT_NOISE QDebug operator<< (QDebug s, const KDateTime &time)
 
QDebug operator<< (QDebug s, KDebugStreamFunction f)
 

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 kdebugdialog5 or by editing kdebugrc.

You can also control what you see: see QT_MESSAGE_PATTERN in the QDebug documentation. This is new in Qt 5.0 and replaces the KDE_DEBUG_* variables from KDE 4.x.

Macro Definition Documentation

◆ k_funcinfo

#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 72 of file kdebug.h.

◆ k_lineinfo

#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 81 of file kdebug.h.

◆ KDEBUG_BLOCK

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

Convenience macro for making a standard KDebug::Block.

Definition at line 439 of file kdebug.h.

◆ KWARNING_DEPRECATED

#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 466 of file kdebug.h.

◆ KWARNING_NOTIMPLEMENTED

#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 459 of file kdebug.h.

Typedef Documentation

◆ KDebugStreamFunction

typedef QDebug(* KDebugStreamFunction) (QDebug, KDebugTag)

!

just a tag class

Definition at line 240 of file kdebug.h.

Function Documentation

◆ kDebugDevNull()

KDELIBS4SUPPORT_DEPRECATED_EXPORT_NOISE QDebug kDebugDevNull ( )

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

Definition at line 795 of file kdebug.cpp.

◆ kDebugStream()

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

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

Definition at line 800 of file kdebug.cpp.

◆ kRealBacktrace()

KDELIBS4SUPPORT_DEPRECATED_EXPORT_NOISE QString kRealBacktrace ( int  )

The actual backtrace.

Definition at line 768 of file kdebug.cpp.

This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Thu Nov 30 2023 03:59:11 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.