#include <QtGlobal>
#include <QLoggingCategory>
#include <QMetaEnum>
#include <QTreeWidget>
Go to the source code of this file.
◆ DBG_SRC
#define DBG_SRC QString::fromLatin1(metaObject()->className()) |
◆ DEBUG
◆ DEBUG_N
◆ DEBUG_REGISTER
#define DEBUG_REGISTER |
( |
|
src | ) |
|
Value:
public: \
}; \
static src##
Tracer src##TracerGlobal;
The singleton class for switching on or off debug messages.
Definition debug_utils.h:58
static void registerClass(const char *name, bool state=true, const char *filePath=0)
Definition debug_utils.cpp:212
◆ DEBUG_REGISTER_DISABLED
#define DEBUG_REGISTER_DISABLED |
( |
|
src | ) |
|
Value:
public: \
}; \
static src##
Tracer src##TracerGlobal;
◆ DEBUG_SHOW_FILTER
◆ ENUM_NAME
#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.
◆ IS_DEBUG_ENABLED
◆ uDebug
#define uDebug |
( |
| ) |
qCDebug(UMBRELLO) |
◆ uError
#define uError |
( |
| ) |
qCCritical(UMBRELLO) |
◆ uIgnoreZeroPointer
#define uIgnoreZeroPointer |
( |
|
a | ) |
if (!a) { uDebug() << "zero pointer detected" << __FILE__ << __LINE__; continue; } |
◆ uWarning
#define uWarning |
( |
| ) |
qCWarning(UMBRELLO) |