Skip to content

Commit

Permalink
QLogging: Add missing newline in win_message_handler()
Browse files Browse the repository at this point in the history
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 <thiago.macieira@intel.com>
  • Loading branch information
Nerixyz committed Feb 6, 2024
1 parent 24224f1 commit c05f987
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/corelib/global/qlogging.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down

0 comments on commit c05f987

Please sign in to comment.