Logging: Remove outdated QMessageHandler

Commit d9a1c2dff replaced QMessageHandler with QtMessageHandler. However,
the old signature was still supported for a grace period.

Change-Id: I3141499efdc749460b77de1ceec82f312e904bec
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This commit is contained in:
Kai Koehne 2012-06-06 20:11:50 +02:00 committed by Qt by Nokia
parent 5e79415218
commit 0f73d7bb35
2 changed files with 0 additions and 24 deletions

View File

@ -625,7 +625,6 @@ Q_CORE_EXPORT QString qMessageFormatString(QtMsgType type, const QMessageLogCont
static QtMsgHandler msgHandler = 0; // pointer to debug handler (without context) static QtMsgHandler msgHandler = 0; // pointer to debug handler (without context)
static QtMessageHandler messageHandler = 0; // pointer to debug handler (with context) static QtMessageHandler messageHandler = 0; // pointer to debug handler (with context)
static QMessageHandler messageHandler2 = 0; // TODO: Remove before Qt5.0 beta
/*! /*!
\internal \internal
@ -669,12 +668,6 @@ void qt_message_output(QtMsgType msgType, const QMessageLogContext &context, con
msgHandler = qDefaultMsgHandler; msgHandler = qDefaultMsgHandler;
if (!messageHandler) if (!messageHandler)
messageHandler = qDefaultMessageHandler; messageHandler = qDefaultMessageHandler;
if (!messageHandler2)
messageHandler2 = qDefaultMessageHandler2;
if (messageHandler == qDefaultMessageHandler
&& messageHandler2 != qDefaultMessageHandler2)
(*messageHandler2)(msgType, context, message.toLocal8Bit().constData());
// prefer new message handler over the old one // prefer new message handler over the old one
if (msgHandler == qDefaultMsgHandler if (msgHandler == qDefaultMsgHandler
@ -875,19 +868,6 @@ QtMessageHandler qInstallMessageHandler(QtMessageHandler h)
return old; return old;
} }
QMessageHandler qInstallMessageHandler(QMessageHandler h)
{
if (!messageHandler2)
messageHandler2 = qDefaultMessageHandler2;
QMessageHandler old = messageHandler2;
messageHandler2 = h;
#if defined(Q_OS_WIN) && defined(QT_BUILD_CORE_LIB)
if (!messageHandler2 && usingWinMain)
messageHandler2 = qWinMessageHandler2;
#endif
return old;
}
QtMsgHandler qInstallMsgHandler(QtMsgHandler h) QtMsgHandler qInstallMsgHandler(QtMsgHandler h)
{ {
//if handler is 0, set it to the //if handler is 0, set it to the

View File

@ -168,10 +168,6 @@ Q_CORE_EXPORT QtMsgHandler qInstallMsgHandler(QtMsgHandler);
typedef void (*QtMessageHandler)(QtMsgType, const QMessageLogContext &, const QString &); typedef void (*QtMessageHandler)(QtMsgType, const QMessageLogContext &, const QString &);
Q_CORE_EXPORT QtMessageHandler qInstallMessageHandler(QtMessageHandler); Q_CORE_EXPORT QtMessageHandler qInstallMessageHandler(QtMessageHandler);
// TODO: Remove before Qt5.0 Beta
typedef void (*QMessageHandler)(QtMsgType, const QMessageLogContext &, const char *);
Q_CORE_EXPORT QMessageHandler qInstallMessageHandler(QMessageHandler);
Q_CORE_EXPORT void qSetMessagePattern(const QString &messagePattern); Q_CORE_EXPORT void qSetMessagePattern(const QString &messagePattern);
QT_END_HEADER QT_END_HEADER