From 924b02aecbce4843ff9d0a7d1d15f1eb154f5d69 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tor=20Arne=20Vestb=C3=B8?= Date: Wed, 19 Apr 2017 15:54:47 +0200 Subject: Revert "Initialize QLoggingRegistry rules on first use, not qApp construction" This reverts commit 47cc9e23a313d67a4a3107242f205d2473842021. We use QCoreApplication::applicationDirPath in the logging initialization to find a possible qtlogging.ini file. Because QCoreApplication::applicationDirPath requires a QCoreApplication instance this leads to a qWarning, which in turn leads to a recursive call to the logging initialization, and in turn to a recursive mutex deadlock. Task-number: QTCREATORBUG-18031 Change-Id: Ic75e1e8c062eb647991725378489bf87c9648cca Reviewed-by: Friedemann Kleint --- src/corelib/io/qloggingregistry.cpp | 1 - src/corelib/io/qloggingregistry_p.h | 3 ++- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'src/corelib/io') diff --git a/src/corelib/io/qloggingregistry.cpp b/src/corelib/io/qloggingregistry.cpp index 9a5c923323..47fb1fb6b8 100644 --- a/src/corelib/io/qloggingregistry.cpp +++ b/src/corelib/io/qloggingregistry.cpp @@ -255,7 +255,6 @@ void QLoggingSettingsParser::parseNextLine(QStringRef line) QLoggingRegistry::QLoggingRegistry() : categoryFilter(defaultCategoryFilter) { - init(); } static bool qtLoggingDebug() diff --git a/src/corelib/io/qloggingregistry_p.h b/src/corelib/io/qloggingregistry_p.h index 768f3b4a91..69fc6ea4ec 100644 --- a/src/corelib/io/qloggingregistry_p.h +++ b/src/corelib/io/qloggingregistry_p.h @@ -113,6 +113,8 @@ class Q_AUTOTEST_EXPORT QLoggingRegistry public: QLoggingRegistry(); + void init(); + void registerCategory(QLoggingCategory *category, QtMsgType enableForLevel); void unregisterCategory(QLoggingCategory *category); @@ -124,7 +126,6 @@ public: static QLoggingRegistry *instance(); private: - void init(); void updateRules(); static void defaultCategoryFilter(QLoggingCategory *category); -- cgit v1.2.3