Add newlines to qEmergencyOut output on stderr.
qt_message, in the regular case, calls qt_message_print, which invokes the default message handler (qDefaultMessageHandler), which uses qMessageFormatString to construct a string, and then platform-dependent methods to print this out. This means that qMessageFormatString's newline is the one that separates debug messages. Unfortunately, in the emergency case, we don't have this luxury of doing formatting: so just make sure to add a newline so output is readable. Change-Id: I8f7bbceb9347b6312748f0f426feebaf04f6a226 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This commit is contained in:
parent
be8999038f
commit
e8af66f906
@ -184,14 +184,14 @@ static void qEmergencyOut(QtMsgType msgType, const char *msg, va_list ap) Q_DECL
|
||||
OutputDebugStringW(emergency_bufL);
|
||||
# else
|
||||
if (qWinLogToStderr()) {
|
||||
fprintf(stderr, "%s", emergency_buf);
|
||||
fprintf(stderr, "%s\n", emergency_buf);
|
||||
fflush(stderr);
|
||||
} else {
|
||||
OutputDebugStringA(emergency_buf);
|
||||
}
|
||||
# endif
|
||||
#else
|
||||
fprintf(stderr, "%s", emergency_buf);
|
||||
fprintf(stderr, "%s\n", emergency_buf);
|
||||
fflush(stderr);
|
||||
#endif
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user