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
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
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
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