|
umbrello 26.03.70-f7b1fd3
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 | logDebug0(s) |
| #define | logInfo0(s) UMLApp::app()->logInfo(QStringLiteral(s)) |
| #define | logWarn0(s) UMLApp::app()->logWarn(QStringLiteral(s)) |
| #define | logError0(s) UMLApp::app()->logError(QStringLiteral(s)) |
| #define | logDebug1(s, a) |
| #define | logInfo1(s, a) do { QString fmt = QString(QStringLiteral(s)).arg(a); UMLApp::app()->logInfo(fmt); } while (0) |
| #define | logWarn1(s, a) do { QString fmt = QString(QStringLiteral(s)).arg(a); UMLApp::app()->logWarn(fmt); } while (0) |
| #define | logError1(s, a) do { QString fmt = QString(QStringLiteral(s)).arg(a); UMLApp::app()->logError(fmt); } while (0) |
| #define | logDebug2(s, a, b) |
| #define | logInfo2(s, a, b) do { QString fmt = QString(QStringLiteral(s)).arg(a).arg(b); UMLApp::app()->logInfo(fmt); } while (0) |
| #define | logWarn2(s, a, b) do { QString fmt = QString(QStringLiteral(s)).arg(a).arg(b); UMLApp::app()->logWarn(fmt); } while (0) |
| #define | logError2(s, a, b) do { QString fmt = QString(QStringLiteral(s)).arg(a).arg(b); UMLApp::app()->logError(fmt); } while (0) |
| #define | logDebug3(s, a, b, c) |
| #define | logInfo3(s, a, b, c) do { QString fmt = QString(QStringLiteral(s)).arg(a).arg(b).arg(c); UMLApp::app()->logInfo(fmt); } while (0) |
| #define | logWarn3(s, a, b, c) do { QString fmt = QString(QStringLiteral(s)).arg(a).arg(b).arg(c); UMLApp::app()->logWarn(fmt); } while (0) |
| #define | logError3(s, a, b, c) do { QString fmt = QString(QStringLiteral(s)).arg(a).arg(b).arg(c); UMLApp::app()->logError(fmt); } while (0) |
| #define | logDebug4(s, a, b, c, d) |
| #define | logInfo4(s, a, b, c, d) do { QString fmt = QString(QStringLiteral(s)).arg(a).arg(b).arg(c).arg(d); UMLApp::app()->logInfo(fmt); } while (0) |
| #define | logWarn4(s, a, b, c, d) do { QString fmt = QString(QStringLiteral(s)).arg(a).arg(b).arg(c).arg(d); UMLApp::app()->logWarn(fmt); } while (0) |
| #define | logError4(s, a, b, c, d) do { QString fmt = QString(QStringLiteral(s)).arg(a).arg(b).arg(c).arg(d); UMLApp::app()->logError(fmt); } while (0) |
| #define | logDebug5(s, a, b, c, d, e) |
| #define | logInfo5(s, a, b, c, d, e) |
| #define | logWarn5(s, a, b, c, d, e) |
| #define | logError5(s, a, b, c, d, e) |
| #define | logDebug6(s, a, b, c, d, e, f) |
Functions | |
| template<typename T > | |
| QString | toString (const T &value) |
| #define DBG_SRC QString::fromLatin1(metaObject()->className()) |
| #define DEBUG_N | ( | latin1str | ) | if (Tracer::instance()->logToConsole() || Tracer::instance()->isEnabled(latin1str)) uDebug() |
| #define DEBUG_REGISTER | ( | src | ) |
| #define DEBUG_REGISTER_DISABLED | ( | src | ) |
| #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 logDebug0 | ( | s | ) |
| #define logDebug1 | ( | s, | |
| a | |||
| ) |
| #define logError0 | ( | s | ) | UMLApp::app()->logError(QStringLiteral(s)) |
| #define logError1 | ( | s, | |
| a | |||
| ) | do { QString fmt = QString(QStringLiteral(s)).arg(a); UMLApp::app()->logError(fmt); } while (0) |
| #define logError2 | ( | s, | |
| a, | |||
| b | |||
| ) | do { QString fmt = QString(QStringLiteral(s)).arg(a).arg(b); UMLApp::app()->logError(fmt); } while (0) |
| #define logError3 | ( | s, | |
| a, | |||
| b, | |||
| c | |||
| ) | do { QString fmt = QString(QStringLiteral(s)).arg(a).arg(b).arg(c); UMLApp::app()->logError(fmt); } while (0) |
| #define logError4 | ( | s, | |
| a, | |||
| b, | |||
| c, | |||
| d | |||
| ) | do { QString fmt = QString(QStringLiteral(s)).arg(a).arg(b).arg(c).arg(d); UMLApp::app()->logError(fmt); } while (0) |
| #define logInfo0 | ( | s | ) | UMLApp::app()->logInfo(QStringLiteral(s)) |
| #define logInfo1 | ( | s, | |
| a | |||
| ) | do { QString fmt = QString(QStringLiteral(s)).arg(a); UMLApp::app()->logInfo(fmt); } while (0) |
| #define logInfo2 | ( | s, | |
| a, | |||
| b | |||
| ) | do { QString fmt = QString(QStringLiteral(s)).arg(a).arg(b); UMLApp::app()->logInfo(fmt); } while (0) |
| #define logInfo3 | ( | s, | |
| a, | |||
| b, | |||
| c | |||
| ) | do { QString fmt = QString(QStringLiteral(s)).arg(a).arg(b).arg(c); UMLApp::app()->logInfo(fmt); } while (0) |
| #define logInfo4 | ( | s, | |
| a, | |||
| b, | |||
| c, | |||
| d | |||
| ) | do { QString fmt = QString(QStringLiteral(s)).arg(a).arg(b).arg(c).arg(d); UMLApp::app()->logInfo(fmt); } while (0) |
| #define logWarn0 | ( | s | ) | UMLApp::app()->logWarn(QStringLiteral(s)) |
| #define logWarn1 | ( | s, | |
| a | |||
| ) | do { QString fmt = QString(QStringLiteral(s)).arg(a); UMLApp::app()->logWarn(fmt); } while (0) |
| #define logWarn2 | ( | s, | |
| a, | |||
| b | |||
| ) | do { QString fmt = QString(QStringLiteral(s)).arg(a).arg(b); UMLApp::app()->logWarn(fmt); } while (0) |
| #define logWarn3 | ( | s, | |
| a, | |||
| b, | |||
| c | |||
| ) | do { QString fmt = QString(QStringLiteral(s)).arg(a).arg(b).arg(c); UMLApp::app()->logWarn(fmt); } while (0) |
| #define logWarn4 | ( | s, | |
| a, | |||
| b, | |||
| c, | |||
| d | |||
| ) | do { QString fmt = QString(QStringLiteral(s)).arg(a).arg(b).arg(c).arg(d); UMLApp::app()->logWarn(fmt); } while (0) |
| #define uDebug | ( | ) | qCDebug(UMBRELLO) |
| #define uError | ( | ) | qCCritical(UMBRELLO) |
| #define uIgnoreZeroPointer | ( | a | ) | if (!a) { uDebug() << "zero pointer detected" << __FILE__ << __LINE__; continue; } |
| #define uWarning | ( | ) | qCWarning(UMBRELLO) |
| QString toString | ( | const T & | value | ) |