umbrello 2.39.0
Umbrello UML Modeller is a Unified Modelling Language (UML) diagram program based on KDE Technology
|
#include <QtGlobal>
#include <QLoggingCategory>
#include <QMetaEnum>
#include <QTreeWidget>
Go to the source code of this file.
Classes | |
class | Tracer |
The singleton class for switching on or off debug messages. More... | |
class | Tracer::MapEntry |
Macros | |
#define | uDebug() qCDebug(UMBRELLO) |
#define | uError() qCCritical(UMBRELLO) |
#define | uWarning() qCWarning(UMBRELLO) |
#define | DBG_SRC QString::fromLatin1(metaObject()->className()) |
#define | DEBUG_SHOW_FILTER() Tracer::instance()->show() |
#define | DEBUG_N(latin1str) if (Tracer::instance()->logToConsole() || Tracer::instance()->isEnabled(latin1str)) uDebug() |
#define | DEBUG() DEBUG_N(DBG_SRC) |
#define | IS_DEBUG_ENABLED() Tracer::instance()->isEnabled(DBG_SRC) |
#define | DEBUG_REGISTER(src) |
#define | DEBUG_REGISTER_DISABLED(src) |
#define | uIgnoreZeroPointer(a) if (!a) { uDebug() << "zero pointer detected" << __FILE__ << __LINE__; continue; } |
#define | ENUM_NAME(o, e, v) (o::staticMetaObject.enumerator(o::staticMetaObject.indexOfEnumerator(#e)).valueToKey((v))) |
#define DBG_SRC QString::fromLatin1(metaObject()->className()) |
#define DEBUG_N | ( | latin1str | ) | if (Tracer::instance()->logToConsole() || Tracer::instance()->isEnabled(latin1str)) uDebug() |
#define DEBUG_SHOW_FILTER | ( | ) | Tracer::instance()->show() |
#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.
#define IS_DEBUG_ENABLED | ( | ) | Tracer::instance()->isEnabled(DBG_SRC) |
#define uError | ( | ) | qCCritical(UMBRELLO) |
#define uIgnoreZeroPointer | ( | a | ) | if (!a) { uDebug() << "zero pointer detected" << __FILE__ << __LINE__; continue; } |