From f16ab166bc7e33c6d4d4aa606618c8ed152608f1 Mon Sep 17 00:00:00 2001 From: Edward Welbourne Date: Mon, 20 Jul 2020 12:37:22 +0200 Subject: QLogging: purge deprecated qInstallMsgHandler(QtMsgHandler) Deprecated since 5.0. Renamed a function in a manual test that no longer needs to say it's Qt5-specific. Change-Id: I6f2159c702f389d378a0e4d86bd4fe633298b100 Reviewed-by: Kai Koehne --- src/corelib/global/qlogging.cpp | 27 +-------------------------- 1 file changed, 1 insertion(+), 26 deletions(-) (limited to 'src/corelib/global/qlogging.cpp') diff --git a/src/corelib/global/qlogging.cpp b/src/corelib/global/qlogging.cpp index 5c17679fb1..bfb2535448 100644 --- a/src/corelib/global/qlogging.cpp +++ b/src/corelib/global/qlogging.cpp @@ -1487,12 +1487,6 @@ QString qFormatLogMessage(QtMsgType type, const QMessageLogContext &context, con return message; } -#if !QT_DEPRECATED_SINCE(5, 0) -// make sure they're defined to be exported -typedef void (*QtMsgHandler)(QtMsgType, const char *); -Q_CORE_EXPORT QtMsgHandler qInstallMsgHandler(QtMsgHandler); -#endif - static void qDefaultMsgHandler(QtMsgType type, const char *buf); static void qDefaultMessageHandler(QtMsgType type, const QMessageLogContext &context, const QString &buf); @@ -1960,7 +1954,7 @@ void qErrnoWarning(int code, const char *msg, ...) \snippet code/src_corelib_global_qglobal.cpp 7 This typedef is deprecated, you should use QtMessageHandler instead. - \sa QtMsgType, QtMessageHandler, qInstallMsgHandler(), qInstallMessageHandler() + \sa QtMsgType, QtMessageHandler, qInstallMessageHandler() */ /*! @@ -2010,16 +2004,6 @@ void qErrnoWarning(int code, const char *msg, ...) {Debugging Techniques} */ -/*! - \fn QtMsgHandler qInstallMsgHandler(QtMsgHandler handler) - \relates - \deprecated - - Installs a Qt message \a handler which has been defined - previously. This method is deprecated, use qInstallMessageHandler - instead. - \sa QtMsgHandler, qInstallMessageHandler() -*/ /*! \fn void qSetMessagePattern(const QString &pattern) \relates @@ -2096,15 +2080,6 @@ QtMessageHandler qInstallMessageHandler(QtMessageHandler h) return qDefaultMessageHandler; } -QtMsgHandler qInstallMsgHandler(QtMsgHandler h) -{ - const auto old = msgHandler.fetchAndStoreOrdered(h); - if (old) - return old; - else - return qDefaultMsgHandler; -} - void qSetMessagePattern(const QString &pattern) { const auto locker = qt_scoped_lock(QMessagePattern::mutex); -- cgit v1.2.3