diff options
author | Edward Welbourne <edward.welbourne@qt.io> | 2020-07-21 16:55:05 +0200 |
---|---|---|
committer | Edward Welbourne <edward.welbourne@qt.io> | 2020-07-27 11:19:59 +0200 |
commit | 07a5ab6c622608d80ffbe6971f9511108efd6e26 (patch) | |
tree | 65565895765f762b4f1ddf65f47d40757a4856d4 /src/corelib/io/qloggingcategory.cpp | |
parent | 953cca326de823c1a4bf9ea29c350f09822a2a75 (diff) |
Unify QLoggingCategory's two constructors
This follows upon commit ca0df4b2694fc3ca0c31cda0d5edec7e76f7dfcb's
comment requesting the unification. Tidied docs at the same time.
Task-number: QTBUG-85700
Change-Id: Ia12dbe98b94388030c7a06036c5287cfbcc4fd05
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
Diffstat (limited to 'src/corelib/io/qloggingcategory.cpp')
-rw-r--r-- | src/corelib/io/qloggingcategory.cpp | 21 |
1 files changed, 4 insertions, 17 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 */ |