summaryrefslogtreecommitdiffstats
path: root/src/corelib/global/qlogging.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/corelib/global/qlogging.h')
-rw-r--r--src/corelib/global/qlogging.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/corelib/global/qlogging.h b/src/corelib/global/qlogging.h
index 5ae1fb3205..6d651ee8a0 100644
--- a/src/corelib/global/qlogging.h
+++ b/src/corelib/global/qlogging.h
@@ -82,6 +82,8 @@ private:
friend class QDebug;
};
+class QLoggingCategory;
+
class Q_CORE_EXPORT QMessageLogger
{
Q_DISABLE_COPY(QMessageLogger)
@@ -98,6 +100,15 @@ public:
void warning(const char *msg, ...) const Q_ATTRIBUTE_FORMAT_PRINTF(2, 3);
void critical(const char *msg, ...) const Q_ATTRIBUTE_FORMAT_PRINTF(2, 3);
+ typedef QLoggingCategory &(*CategoryFunction)();
+
+ void debug(const QLoggingCategory &cat, const char *msg, ...) const Q_ATTRIBUTE_FORMAT_PRINTF(3, 4);
+ void debug(CategoryFunction catFunc, const char *msg, ...) const Q_ATTRIBUTE_FORMAT_PRINTF(3, 4);
+ void warning(const QLoggingCategory &cat, const char *msg, ...) const Q_ATTRIBUTE_FORMAT_PRINTF(3, 4);
+ void warning(CategoryFunction catFunc, const char *msg, ...) const Q_ATTRIBUTE_FORMAT_PRINTF(3, 4);
+ void critical(const QLoggingCategory &cat, const char *msg, ...) const Q_ATTRIBUTE_FORMAT_PRINTF(3, 4);
+ void critical(CategoryFunction catFunc, const char *msg, ...) const Q_ATTRIBUTE_FORMAT_PRINTF(3, 4);
+
#ifndef Q_CC_MSVC
Q_NORETURN
#endif
@@ -105,8 +116,14 @@ public:
#ifndef QT_NO_DEBUG_STREAM
QDebug debug() const;
+ QDebug debug(const QLoggingCategory &cat) const;
+ QDebug debug(CategoryFunction catFunc) const;
QDebug warning() const;
+ QDebug warning(const QLoggingCategory &cat) const;
+ QDebug warning(CategoryFunction catFunc) const;
QDebug critical() const;
+ QDebug critical(const QLoggingCategory &cat) const;
+ QDebug critical(CategoryFunction catFunc) const;
QNoDebug noDebug() const Q_DECL_NOTHROW;
#endif // QT_NO_DEBUG_STREAM