summaryrefslogtreecommitdiffstats
path: root/src/corelib/io/qloggingregistry.cpp
diff options
context:
space:
mode:
authorGiorgos Tsiapaliokas <terietor@gmail.com>2013-11-29 15:21:03 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2014-02-10 16:28:30 +0100
commitd61e7743078197f7409e863ff1d2243da7d0335f (patch)
tree45109f1b1b89807c78f8d7597a91ad99e10e7160 /src/corelib/io/qloggingregistry.cpp
parent3d08681169b5194cdc9e61fbf6fac9c4346147d8 (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/qloggingregistry.cpp')
-rw-r--r--src/corelib/io/qloggingregistry.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/corelib/io/qloggingregistry.cpp b/src/corelib/io/qloggingregistry.cpp
index a82e6f65f4..fd25ff697e 100644
--- a/src/corelib/io/qloggingregistry.cpp
+++ b/src/corelib/io/qloggingregistry.cpp
@@ -283,9 +283,13 @@ QLoggingRegistry *QLoggingRegistry::instance()
*/
void QLoggingRegistry::defaultCategoryFilter(QLoggingCategory *cat)
{
- // QLoggingCategory() normalizes all "default" strings
+ // QLoggingCategory() normalizes "default" strings
// to qtDefaultCategoryName
- bool debug = (cat->categoryName() == qtDefaultCategoryName);
+ bool debug = true;
+ char c;
+ if (!memcmp(cat->categoryName(), "qt", 2) && (!(c = cat->categoryName()[2]) || c == '.'))
+ debug = false;
+
bool warning = true;
bool critical = true;