From c05f987fcd36bf2f194f0dedb37f4eea7a68e4f5 Mon Sep 17 00:00:00 2001 From: Johannes Grunenberg Date: Tue, 6 Feb 2024 00:29:47 +0100 Subject: [PATCH] QLogging: Add missing newline in win_message_handler() Neither win_outputDebugString_helper() nor OutputDebugString() add a newline at the end of the message, so one needs to be added before being passed to the output handler. A newline was previously present but removed when deduplicating calls to qFormatLogMessage(). Fixes: QTBUG-121947 Pick-to: 6.7 Change-Id: I9f1c1d8726e4234f24999f47c52340140d5a4614 Reviewed-by: Thiago Macieira --- src/corelib/global/qlogging.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/corelib/global/qlogging.cpp b/src/corelib/global/qlogging.cpp index 50934701fa4..82257259a84 100644 --- a/src/corelib/global/qlogging.cpp +++ b/src/corelib/global/qlogging.cpp @@ -1861,7 +1861,7 @@ static bool win_message_handler(QtMsgType, const QMessageLogContext &, if (shouldLogToStderr()) return false; // Leave logging up to stderr handler - win_outputDebugString_helper(formattedMessage); + win_outputDebugString_helper(formattedMessage + u'\n'); return true; // Prevent further output to stderr }