diff options
Diffstat (limited to 'src/corelib/io')
-rw-r--r-- | src/corelib/io/qloggingcategory.cpp | 21 | ||||
-rw-r--r-- | src/corelib/io/qloggingcategory.h | 4 |
2 files changed, 5 insertions, 20 deletions
diff --git a/src/corelib/io/qloggingcategory.cpp b/src/corelib/io/qloggingcategory.cpp index 5de8be116c..ac633f1885 100644 --- a/src/corelib/io/qloggingcategory.cpp +++ b/src/corelib/io/qloggingcategory.cpp @@ -197,27 +197,14 @@ static void setBoolLane(QBasicAtomicInt *atomic, bool enable, int shift) */ /*! - Constructs a QLoggingCategory object with the provided \a category name. - All message types for this category are enabled by default. - - If \a category is \c{0}, the category name is changed to \c "default". - - \note \a category must be kept valid during the lifetime of this object. -*/ -QLoggingCategory::QLoggingCategory(const char *category) - : d(nullptr), - name(nullptr) -{ - init(category, QtDebugMsg); -} - -/*! Constructs a QLoggingCategory object with the provided \a category name, - and enables all messages with types more severe or equal than \a enableForLevel. + and enables all messages with types at least as verbose as \a enableForLevel, + which defaults to QtDebugMsg (which enables all categories). - If \a category is \c{0}, the category name is changed to \c "default". + If \a category is \nullptr, the category name \c "default" is used. \note \a category must be kept valid during the lifetime of this object. + Using a string literal for it is the usual way to achieve this. \since 5.4 */ diff --git a/src/corelib/io/qloggingcategory.h b/src/corelib/io/qloggingcategory.h index 1c3e10b493..6e74a8c3be 100644 --- a/src/corelib/io/qloggingcategory.h +++ b/src/corelib/io/qloggingcategory.h @@ -49,9 +49,7 @@ class Q_CORE_EXPORT QLoggingCategory { Q_DISABLE_COPY(QLoggingCategory) public: - // ### Qt 6: Merge constructors - explicit QLoggingCategory(const char *category); - QLoggingCategory(const char *category, QtMsgType severityLevel); + explicit QLoggingCategory(const char *category, QtMsgType severityLevel = QtDebugMsg); ~QLoggingCategory(); bool isEnabled(QtMsgType type) const; |