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:
parent
5e79415218
commit
0f73d7bb35
@ -625,7 +625,6 @@ Q_CORE_EXPORT QString qMessageFormatString(QtMsgType type, const QMessageLogCont
|
||||
|
||||
static QtMsgHandler msgHandler = 0; // pointer to debug handler (without context)
|
||||
static QtMessageHandler messageHandler = 0; // pointer to debug handler (with context)
|
||||
static QMessageHandler messageHandler2 = 0; // TODO: Remove before Qt5.0 beta
|
||||
|
||||
/*!
|
||||
\internal
|
||||
@ -669,12 +668,6 @@ void qt_message_output(QtMsgType msgType, const QMessageLogContext &context, con
|
||||
msgHandler = qDefaultMsgHandler;
|
||||
if (!messageHandler)
|
||||
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
|
||||
if (msgHandler == qDefaultMsgHandler
|
||||
@ -875,19 +868,6 @@ QtMessageHandler qInstallMessageHandler(QtMessageHandler h)
|
||||
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)
|
||||
{
|
||||
//if handler is 0, set it to the
|
||||
|
@ -168,10 +168,6 @@ Q_CORE_EXPORT QtMsgHandler qInstallMsgHandler(QtMsgHandler);
|
||||
typedef void (*QtMessageHandler)(QtMsgType, const QMessageLogContext &, const QString &);
|
||||
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);
|
||||
|
||||
QT_END_HEADER
|
||||
|
Loading…
Reference in New Issue
Block a user