I'm working to integrade category log with QMessageLogger & Co and
unfortunatelly we can not use
qDebg(<category>) << "my message" because there is already a debug(const char
*msg, ...) function
combining with the macro
#define qDebug QMessageLogger(__FILE__, __LINE__, Q_FUNC_INFO).debug.
So I use a new function and macro:
QDebug debug();
QDebug debugCategory(const char *msg);
QDebug warning();
QDebug warningCategory(const char *msg);
QDebug critical();
QDebug criticalCategory(const char *msg);
QDebug fatalCategory(const char *msg);
#define qDebugCat(category) QMessageLogger(__FILE__, __LINE__,
Q_FUNC_INFO).debugCategory(#category)
#define qWarningCat(category) QMessageLogger(__FILE__, __LINE__,
Q_FUNC_INFO).warningCategory(#category)
#define qCriticalCat(category) QMessageLogger(__FILE__, __LINE__,
Q_FUNC_INFO).criticalCategory(#category)
#define qFatalCat(category) QMessageLogger(__FILE__, __LINE__,
Q_FUNC_INFO).fatalCategory(#category)
Any problems with this naming conventions???
Cheers,
WB
_______________________________________________
Development mailing list
[email protected]
http://lists.qt-project.org/mailman/listinfo/development