Allow qDebug output to be configured by qSetMessagePattern()
authorKai Koehne <kai.koehne@nokia.com>
Fri, 13 Apr 2012 11:37:56 +0000 (13:37 +0200)
committerQt by Nokia <qt-info@nokia.com>
Tue, 24 Apr 2012 15:12:46 +0000 (17:12 +0200)
commitc0d249019b098890fb8e5e9e144c2dd8029a670c
treec65c071920b8e8ebb3b1ad65ae1f5df7851ddcf3
parente92e5fda44602d7595aca329a3133ecb9991a6dd
Allow qDebug output to be configured by qSetMessagePattern()

Add qSetMessagePattern() to configure the default
message pattern. This one can still be overwritten by setting the
QT_MESSAGE_PATTERN environment variable.

Without this method, there's actually no way to change the
default output programatically. Since QT_MESSAGE_PATTERN is
evaluated when the first message arrives, setting it via e.g. qputenv
might have no effect/be too late.

Change-Id: I115e0c30606f128fdbf5c169a951ffa2a6a48517
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
src/corelib/global/qglobal.cpp
src/corelib/global/qlogging.cpp
src/corelib/global/qlogging.h
tests/auto/corelib/global/qlogging/app/main.cpp
tests/auto/corelib/global/qlogging/tst_qlogging.cpp