KDECore
Go to the documentation of this file.
27 #include <QtCore/QDebug>
28 #include <QtCore/QElapsedTimer>
44 #if !defined(KDE_NO_DEBUG_OUTPUT)
45 # if defined(QT_NO_DEBUG_OUTPUT) || defined(QT_NO_DEBUG_STREAM)
46 # define KDE_NO_DEBUG_OUTPUT
50 #if !defined(KDE_NO_WARNING_OUTPUT)
51 # if defined(QT_NO_WARNING_OUTPUT)
52 # define KDE_NO_WARNING_OUTPUT
57 # define KDE_DEBUG_ENABLED_BY_DEFAULT false
59 # define KDE_DEBUG_ENABLED_BY_DEFAULT true
76 #define k_lineinfo "[" << __FILE__ << ":" << __LINE__ << "] "
82 KDECORE_EXPORT QDebug
kDebugStream(QtMsgType level,
int area,
const char *file = 0,
83 int line = -1,
const char *funcinfo = 0);
107 #if !defined(KDE_NO_DEBUG_OUTPUT)
120 #ifndef KDE_DEFAULT_DEBUG_AREA
121 # define KDE_DEFAULT_DEBUG_AREA 0
145 #if !defined(KDE_NO_DEBUG_OUTPUT)
157 #else // KDE_NO_DEBUG_OUTPUT
162 #if !defined(KDE_NO_WARNING_OUTPUT)
174 #else // KDE_NO_WARNING_OUTPUT
222 #if 1 || defined(KDE3_SUPPORT)
223 #ifndef KDE_NO_DEPRECATED
246 const char *funcinfo;
251 explicit inline KDebug(QtMsgType type,
const char *f = 0,
int l = -1,
const char *info = 0)
252 : file(f), funcinfo(info), line(l), level(type)
254 #ifdef KDE4_CMAKE_TOPLEVEL_DIR_LENGTH // set by FindKDE4Internal.cmake
255 file = file + KDE4_CMAKE_TOPLEVEL_DIR_LENGTH + 1;
260 {
return kDebugStream(level, area, file, line, funcinfo); }
268 bool enableByDefault);
302 static KDECORE_EXPORT
int registerArea(
const QByteArray& areaName,
bool enabled =
true);
309 #if !defined(KDE_NO_DEBUG_OUTPUT)
311 # if defined(Q_CC_GNU) || (defined(Q_CC_MSVC) && _MSC_VER >= 1500)
312 # define kDebug(...) for (bool _k_kDebugDoOutput_ = !KDebug::hasNullOutputQtDebugMsg(__VA_ARGS__); \
313 KDE_ISUNLIKELY(_k_kDebugDoOutput_); _k_kDebugDoOutput_ = false) \
314 KDebug(QtDebugMsg, __FILE__, __LINE__, Q_FUNC_INFO)(__VA_ARGS__)
316 # define kDebug KDebug(QtDebugMsg, __FILE__, __LINE__, Q_FUNC_INFO)
319 # define kDebug while (false) kDebug
321 #if !defined(KDE_NO_WARNING_OUTPUT)
322 # define kWarning KDebug(QtWarningMsg, __FILE__, __LINE__, Q_FUNC_INFO)
324 # define kWarning while (false) kWarning
327 #ifndef KDE_NO_DEBUG_OUTPUT
361 QElapsedTimer m_startTime;
372 #define KDEBUG_BLOCK KDebug::Block _kDebugBlock(Q_FUNC_INFO);
376 class KDECORE_EXPORT
KDebug::Block
392 #define KWARNING_NOTIMPLEMENTED kWarning() << "NOT-IMPLEMENTED";
399 #define KWARNING_DEPRECATED kWarning() << "DEPRECATED";
This file is part of the KDE documentation.
Documentation copyright © 1996-2013 The KDE developers.
Generated on Sat Jun 1 2013 12:05:02 by
doxygen 1.8.1.1 written
by
Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.