diff options
author | Kai Koehne <kai.koehne@nokia.com> | 2012-04-02 13:48:06 +0200 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-04-20 08:37:06 +0200 |
commit | d9a1c2dff85635076ecaee3507427d750846c85c (patch) | |
tree | 5c60ddcb7815b6ea1789c84c7972ddda2e0a4e85 /src/corelib/global/qglobal.cpp | |
parent | a3f90fd44f822ae9d77c9d115934e18a9c7466fd (diff) |
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>
Diffstat (limited to 'src/corelib/global/qglobal.cpp')
-rw-r--r-- | src/corelib/global/qglobal.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/corelib/global/qglobal.cpp b/src/corelib/global/qglobal.cpp index 74c65d2504..7036b72f08 100644 --- a/src/corelib/global/qglobal.cpp +++ b/src/corelib/global/qglobal.cpp @@ -440,7 +440,7 @@ QT_BEGIN_NAMESPACE Finally, the QtMsgType definition identifies the various messages that can be generated and sent to a Qt message handler; - QMessageHandler is a type definition for a pointer to a function with + QtMessageHandler is a type definition for a pointer to a function with the signature \c {void myMessageHandler(QtMsgType, const QMessageLogContext &, const char *)}. QMessageLogContext class contains the line, file, and function the @@ -476,7 +476,7 @@ QT_BEGIN_NAMESPACE accept a \l qreal value as their argument returning the value rounded up to the nearest integer and 64-bit integer respectively, the qInstallMessageHandler() function which installs the given - QMessageHandler, and the qVersion() function which returns the + QtMessageHandler, and the qVersion() function which returns the version number of Qt at run-time as a string. \section1 Macros @@ -694,7 +694,7 @@ QT_BEGIN_NAMESPACE \value QtSystemMsg - \sa QMessageHandler, qInstallMessageHandler() + \sa QtMessageHandler, qInstallMessageHandler() */ /*! \typedef QFunctionPointer @@ -3026,12 +3026,12 @@ bool QInternal::activateCallbacks(Callback cb, void **parameters) \snippet doc/src/snippets/code/src_corelib_global_qglobal.cpp 7 - This typedef is deprecated, you should use QMessageHandler instead. - \sa QtMsgType, QMessageHandler, qInstallMsgHandler(), qInstallMessageHandler() + This typedef is deprecated, you should use QtMessageHandler instead. + \sa QtMsgType, QtMessageHandler, qInstallMsgHandler(), qInstallMessageHandler() */ /*! - \typedef QMessageHandler + \typedef QtMessageHandler \relates <QtGlobal> \since 5.0 @@ -3044,7 +3044,7 @@ bool QInternal::activateCallbacks(Callback cb, void **parameters) */ /*! - \fn QMessageHandler qInstallMessageHandler(QMessageHandler handler) + \fn QtMessageHandler qInstallMessageHandler(QtMessageHandler handler) \relates <QtGlobal> \since 5.0 @@ -3074,7 +3074,7 @@ bool QInternal::activateCallbacks(Callback cb, void **parameters) \snippet doc/src/snippets/code/src_corelib_global_qglobal.cpp 23 - \sa QMessageHandler, QtMsgType, qDebug(), qWarning(), qCritical(), qFatal(), + \sa QtMessageHandler, QtMsgType, qDebug(), qWarning(), qCritical(), qFatal(), {Debugging Techniques} */ |