Logging: Change arguments of message handler to avoid conversions
authorKai Koehne <kai.koehne@nokia.com>
Mon, 2 Apr 2012 11:48:06 +0000 (13:48 +0200)
committerQt by Nokia <qt-info@nokia.com>
Fri, 20 Apr 2012 06:37:06 +0000 (08:37 +0200)
commitd9a1c2dff85635076ecaee3507427d750846c85c
tree5c60ddcb7815b6ea1789c84c7972ddda2e0a4e85
parenta3f90fd44f822ae9d77c9d115934e18a9c7466fd
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 <thiago.macieira@intel.com>
doc/src/snippets/code/src_corelib_global_qglobal.cpp
src/corelib/global/qglobal.cpp
src/corelib/global/qlogging.cpp
src/corelib/global/qlogging.h
src/corelib/io/qdebug.h
src/corelib/kernel/qcoreapplication_win.cpp
tests/auto/corelib/global/qlogging/tst_qlogging.cpp
tests/auto/corelib/io/qdebug/tst_qdebug.cpp