diff options
author | Giorgos Tsiapaliokas <terietor@gmail.com> | 2013-11-29 15:21:03 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2014-02-10 16:28:30 +0100 |
commit | d61e7743078197f7409e863ff1d2243da7d0335f (patch) | |
tree | 45109f1b1b89807c78f8d7597a91ad99e10e7160 /src/corelib/io/qloggingcategory.cpp | |
parent | 3d08681169b5194cdc9e61fbf6fac9c4346147d8 (diff) |
Print qCDebugs in arbitrary categories by default
The debug output of all categories will be visible by default,
except from the "qt.*" categories. "qt.*" categories are private
and their default debug output will be hidden.
[ChangeLog][QtCore][Logging] Enable qCDebug's for all categories except qt one's
Change-Id: Ibe147c8bbe0835a63b3de782288b9c3251321d8f
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
Diffstat (limited to 'src/corelib/io/qloggingcategory.cpp')
-rw-r--r-- | src/corelib/io/qloggingcategory.cpp | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/src/corelib/io/qloggingcategory.cpp b/src/corelib/io/qloggingcategory.cpp index 8c3ca5fd65..9ddf58b5ea 100644 --- a/src/corelib/io/qloggingcategory.cpp +++ b/src/corelib/io/qloggingcategory.cpp @@ -83,9 +83,8 @@ Q_GLOBAL_STATIC_WITH_ARGS(QLoggingCategory, qtDefaultCategory, \section1 Default category configuration - In the default configuration \l isWarningEnabled() and \l isCriticalEnabled() - will return \c true. \l isDebugEnabled() will return \c true only - for the \c "default" category. + In the default configuration \l isWarningEnabled() , \l isDebugEnabled() and + \l isCriticalEnabled() will return \c true. \section1 Changing the configuration of a category @@ -111,21 +110,20 @@ Q_GLOBAL_STATIC_WITH_ARGS(QLoggingCategory, qtDefaultCategory, QLoggingCategory::QLoggingCategory(const char *category) : d(0), name(0), - enabledDebug(false), + enabledDebug(true), enabledWarning(true), enabledCritical(true) { Q_UNUSED(d); Q_UNUSED(placeholder); - bool isDefaultCategory + const bool isDefaultCategory = (category == 0) || (strcmp(category, qtDefaultCategoryName) == 0); + // normalize "default" category name, so that we can just do + // pointer comparison in QLoggingRegistry::updateCategory if (isDefaultCategory) { - // normalize default category names, so that we can just do - // pointer comparison in QLoggingRegistry::updateCategory name = qtDefaultCategoryName; - enabledDebug = true; } else { name = category; } |