summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFawzi Mohamed <fawzi.mohamed@digia.com>2014-06-12 20:39:14 +0200
committerFawzi Mohamed <fawzi.mohamed@digia.com>2014-06-30 16:15:33 +0200
commit1c769d429a8d32b949f3da801f1efeb4679403f4 (patch)
tree765fdc6841e05d6568bb20a8fbcfde6fa2ee2695
parentce96202857d604a1e381e3323f3846c2209eb8d9 (diff)
downloadqt-creator-1c769d429a8d32b949f3da801f1efeb4679403f4.tar.gz
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 <kai.koehne@digia.com> Reviewed-by: Fawzi Mohamed <fawzi.mohamed@digia.com>
-rw-r--r--src/app/main.cpp2
-rw-r--r--src/libs/utils/logging.h1
2 files changed, 3 insertions, 0 deletions
diff --git a/src/app/main.cpp b/src/app/main.cpp
index 4eb564ffa0..583e97ce44 100644
--- a/src/app/main.cpp
+++ b/src/app/main.cpp
@@ -36,6 +36,7 @@
#include <extensionsystem/pluginspec.h>
#include <qtsingleapplication.h>
#include <utils/hostosinfo.h>
+#include <utils/logging.h>
#include <QDebug>
#include <QDir>
@@ -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 3252287627..da212ef920 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; }