From 1c769d429a8d32b949f3da801f1efeb4679403f4 Mon Sep 17 00:00:00 2001 From: Fawzi Mohamed Date: Thu, 12 Jun 2014 20:39:14 +0200 Subject: [PATCH] creator: disable debug level for the qtc.* logging categories by default all subcategories of qtc have debugging disabled. This allows to easily use them for verbose output and replace per module/file debug flags. Change-Id: I130c496a9ee83d3b3b5cbd9b4e087dc00c40b113 Reviewed-by: Kai Koehne Reviewed-by: Fawzi Mohamed --- src/app/main.cpp | 2 ++ src/libs/utils/logging.h | 1 + 2 files changed, 3 insertions(+) diff --git a/src/app/main.cpp b/src/app/main.cpp index 4eb564ffa01..583e97ce449 100644 --- a/src/app/main.cpp +++ b/src/app/main.cpp @@ -36,6 +36,7 @@ #include #include #include +#include #include #include @@ -286,6 +287,7 @@ static inline QSettings *userSettings() int main(int argc, char **argv) { + QLoggingCategory::setFilterRules(QLatin1String("qtc.*.debug=false")); #ifdef Q_OS_MAC // increase the number of file that can be opened in Qt Creator. struct rlimit rl; diff --git a/src/libs/utils/logging.h b/src/libs/utils/logging.h index 32522876271..da212ef9208 100644 --- a/src/libs/utils/logging.h +++ b/src/libs/utils/logging.h @@ -43,6 +43,7 @@ class QLoggingCategory public: explicit QLoggingCategory(const char *category) : name(category) {} ~QLoggingCategory(); + static void setFilterRules(const QString &) {} bool isDebugEnabled() const { return false; } bool isWarningEnabled() const { return true; }