summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorRobin Burchell <robin.burchell@jollamobile.com>2013-09-24 00:20:56 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-09-24 01:04:16 +0200
commite8af66f90684946eb56ffcce9fa0c7909ba0c390 (patch)
treeb3c9d574a18eed611271568dede135af7ed0fdb5 /src
parentbe8999038ff4afdfca8fa693a7e0e3dbaae54c97 (diff)
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>
Diffstat (limited to 'src')
-rw-r--r--src/corelib/global/qlogging.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/corelib/global/qlogging.cpp b/src/corelib/global/qlogging.cpp
index 1cd11ad667..4d564b09c3 100644
--- a/src/corelib/global/qlogging.cpp
+++ b/src/corelib/global/qlogging.cpp
@@ -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