umbrello/umbrello
#include <QMetaEnum>
#include <QTreeWidget>
#include <kdebug.h>
Go to the source code of this file.
Classes | |
class | Tracer |
Macros | |
#define | DBG_SRC QString::fromLatin1(metaObject()->className()) |
#define | DEBUG(src) if (Tracer::instance()->isEnabled(src)) uDebug() |
#define | DEBUG_REGISTER(src) class src##Tracer { public: src##Tracer() { Tracer::registerClass(QString::fromLatin1(#src), true, QLatin1String(__FILE__)); } }; static src##Tracer src##TracerGlobal; |
#define | DEBUG_REGISTER_DISABLED(src) class src##Tracer { public: src##Tracer() { Tracer::registerClass(QString::fromLatin1(#src), false, QLatin1String(__FILE__)); } }; static src##Tracer src##TracerGlobal; |
#define | DEBUG_SHOW_FILTER() Tracer::instance()->show() |
#define | ENUM_NAME(o, e, v) (o::staticMetaObject.enumerator(o::staticMetaObject.indexOfEnumerator(#e)).valueToKey((v))) |
#define | IS_DEBUG_ENABLED(src) Tracer::instance()->isEnabled(src) |
#define | uDebug() kDebug(8060) |
#define | uError() kError(8060) |
#define | uIgnoreZeroPointer(a) if (!a) { uDebug() << "zero pointer detected" << __FILE__ << __LINE__; continue; } |
#define | uWarning() kWarning(8060) |
Macro Definition Documentation
#define DBG_SRC QString::fromLatin1(metaObject()->className()) |
Definition at line 109 of file debug_utils.h.
#define DEBUG | ( | src | ) | if (Tracer::instance()->isEnabled(src)) uDebug() |
Definition at line 111 of file debug_utils.h.
#define DEBUG_REGISTER | ( | src | ) | class src##Tracer { public: src##Tracer() { Tracer::registerClass(QString::fromLatin1(#src), true, QLatin1String(__FILE__)); } }; static src##Tracer src##TracerGlobal; |
Definition at line 113 of file debug_utils.h.
#define DEBUG_REGISTER_DISABLED | ( | src | ) | class src##Tracer { public: src##Tracer() { Tracer::registerClass(QString::fromLatin1(#src), false, QLatin1String(__FILE__)); } }; static src##Tracer src##TracerGlobal; |
Definition at line 114 of file debug_utils.h.
#define DEBUG_SHOW_FILTER | ( | ) | Tracer::instance()->show() |
Definition at line 110 of file debug_utils.h.
#define ENUM_NAME | ( | o, | |
e, | |||
v | |||
) | (o::staticMetaObject.enumerator(o::staticMetaObject.indexOfEnumerator(#e)).valueToKey((v))) |
In a Q_OBJECT class define any enum as Q_ENUMS.
With the above the following macro returns the name of a given enum. This can be used in debug output. TODO: convert it to a function.
Definition at line 125 of file debug_utils.h.
#define IS_DEBUG_ENABLED | ( | src | ) | Tracer::instance()->isEnabled(src) |
Definition at line 112 of file debug_utils.h.
#define uDebug | ( | ) | kDebug(8060) |
Definition at line 105 of file debug_utils.h.
#define uError | ( | ) | kError(8060) |
Definition at line 106 of file debug_utils.h.
#define uIgnoreZeroPointer | ( | a | ) | if (!a) { uDebug() << "zero pointer detected" << __FILE__ << __LINE__; continue; } |
Definition at line 116 of file debug_utils.h.
#define uWarning | ( | ) | kWarning(8060) |
Definition at line 107 of file debug_utils.h.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:40:27 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.