diff options
Diffstat (limited to 'src/corelib/io')
-rw-r--r-- | src/corelib/io/qloggingcategory.cpp | 15 | ||||
-rw-r--r-- | src/corelib/io/qloggingcategory.h | 2 |
2 files changed, 12 insertions, 5 deletions
diff --git a/src/corelib/io/qloggingcategory.cpp b/src/corelib/io/qloggingcategory.cpp index 6c5df1e8e7..2ef392c209 100644 --- a/src/corelib/io/qloggingcategory.cpp +++ b/src/corelib/io/qloggingcategory.cpp @@ -244,12 +244,19 @@ void QLoggingCategory::setEnabled(QtMsgType type, bool enable) */ /*! - Returns the category \c "default" that is used e.g. by qDebug(), qWarning(), - qCritical(), qFatal(). + Returns a pointer to the global category \c "default" that + is used e.g. by qDebug(), qWarning(), qCritical(), qFatal(). + + \note The returned pointer may be null during destruction of + static objects. + + \note Ownership of the category is not transferred, do not + \c delete the returned pointer. + */ -QLoggingCategory &QLoggingCategory::defaultCategory() +QLoggingCategory *QLoggingCategory::defaultCategory() { - return *qtDefaultCategory(); + return qtDefaultCategory(); } /*! diff --git a/src/corelib/io/qloggingcategory.h b/src/corelib/io/qloggingcategory.h index 35da04c8f2..6009226127 100644 --- a/src/corelib/io/qloggingcategory.h +++ b/src/corelib/io/qloggingcategory.h @@ -72,7 +72,7 @@ public: // allows usage of both factory method and variable in qCX macros QLoggingCategory &operator()() { return *this; } - static QLoggingCategory &defaultCategory(); + static QLoggingCategory *defaultCategory(); typedef void (*CategoryFilter)(QLoggingCategory*); static CategoryFilter installFilter(CategoryFilter); |