summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/corelib/io/qloggingcategory.cpp8
-rw-r--r--src/corelib/io/qloggingcategory.h1
2 files changed, 9 insertions, 0 deletions
diff --git a/src/corelib/io/qloggingcategory.cpp b/src/corelib/io/qloggingcategory.cpp
index 168087659f..f37b9575aa 100644
--- a/src/corelib/io/qloggingcategory.cpp
+++ b/src/corelib/io/qloggingcategory.cpp
@@ -274,6 +274,14 @@ void QLoggingCategory::setEnabled(QtMsgType type, bool enable)
*/
/*!
+ \fn const QLoggingCategory &QLoggingCategory::operator()() const
+
+ Returns the object itself. This allows both a QLoggingCategory variable, and
+ a factory method returning a QLoggingCategory, to be used in \l qCDebug(),
+ \l qCWarning(), \l qCCritical() macros.
+ */
+
+/*!
Returns a pointer to the global category \c "default" that
is used e.g. by qDebug(), qWarning(), qCritical(), qFatal().
diff --git a/src/corelib/io/qloggingcategory.h b/src/corelib/io/qloggingcategory.h
index 7af3af9a24..4aec8e63bf 100644
--- a/src/corelib/io/qloggingcategory.h
+++ b/src/corelib/io/qloggingcategory.h
@@ -65,6 +65,7 @@ public:
// allows usage of both factory method and variable in qCX macros
QLoggingCategory &operator()() { return *this; }
+ const QLoggingCategory &operator()() const { return *this; }
static QLoggingCategory *defaultCategory();