From d9a1c2dff85635076ecaee3507427d750846c85c Mon Sep 17 00:00:00 2001 From: Kai Koehne Date: Mon, 2 Apr 2012 13:48:06 +0200 Subject: Logging: Change arguments of message handler to avoid conversions Introduce a new QtMessageHandler that takes QString instead of char *: This avoids converting to local8bit , only to convert it back to utf16 for Windows. The old QMessageHandler is kept for a transition period, but will be removed before Qt 5.0. Also fix qEmergencyOut (that is called in OOM situations) to not rely on the default message handler. Change-Id: Iee0ce5838f97175c98788b847964273dd22d4a37 Reviewed-by: Thiago Macieira --- src/corelib/io/qdebug.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/corelib/io/qdebug.h') diff --git a/src/corelib/io/qdebug.h b/src/corelib/io/qdebug.h index 48a382eea6..34abb5b75b 100644 --- a/src/corelib/io/qdebug.h +++ b/src/corelib/io/qdebug.h @@ -85,7 +85,7 @@ public: QT_TRY { qt_message_output(stream->type, stream->context, - stream->buffer.toLocal8Bit().data()); + stream->buffer); } QT_CATCH(std::bad_alloc&) { /* We're out of memory - give up. */ } } delete stream; -- cgit v1.2.3