QLogging: use stderr_message_handler() if we fail to grab the handler

Instead of duplicating its stderr handling.

Change-Id: Ifa1111900d6945ea8e05fffd177e149dfa9afff9
Reviewed-by: Samuel Gaist <samuel.gaist@idiap.ch>
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
This commit is contained in:
Thiago Macieira 2023-08-23 10:52:58 -07:00
parent d614067ea0
commit e85c64bb6d

View File

@ -1995,7 +1995,7 @@ static void qt_message_print(QtMsgType msgType, const QMessageLogContext &contex
auto msgHandler = messageHandler.loadAcquire();
(msgHandler ? msgHandler : qDefaultMessageHandler)(msgType, context, message);
} else {
fprintf(stderr, "%s\n", message.toLocal8Bit().constData());
stderr_message_handler(msgType, context, message.toLocal8Bit());
}
}