qFatal: make it so you cannot disable the message

Solves a few recursion problems in Qt, since then we won't try to
inspect the logging registry while creating the logging registry.

Fixes: QTBUG-78007
Change-Id: I44cc9ee732f54d2380bafffd15c0f51c7140682e
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
bb10
Thiago Macieira 2019-09-03 07:49:32 -07:00
parent b9b48464df
commit 15edba4101
1 changed files with 2 additions and 2 deletions

View File

@ -1814,8 +1814,8 @@ static void qt_message_print(QtMsgType msgType, const QMessageLogContext &contex
#ifndef QT_BOOTSTRAPPED
Q_TRACE(qt_message_print, msgType, context.category, context.function, context.file, context.line, message);
// qDebug, qWarning, ... macros do not check whether category is enabled
if (isDefaultCategory(context.category)) {
// qDebug, qWarning, ... macros do not check whether category is enabledgc
if (msgType != QtFatalMsg && isDefaultCategory(context.category)) {
if (QLoggingCategory *defaultCategory = QLoggingCategory::defaultCategory()) {
if (!defaultCategory->isEnabled(msgType))
return;