diff options
author | Edward Welbourne <edward.welbourne@qt.io> | 2020-07-20 12:37:22 +0200 |
---|---|---|
committer | Edward Welbourne <edward.welbourne@qt.io> | 2020-07-23 11:05:53 +0200 |
commit | f16ab166bc7e33c6d4d4aa606618c8ed152608f1 (patch) | |
tree | fd34529a15270d822cd0fee4c036ff92e253b22e /src/corelib/global/qlogging.cpp | |
parent | cbae0301c721a2767b4626138f4a7c0c69c487d4 (diff) |
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 <kai.koehne@qt.io>
Diffstat (limited to 'src/corelib/global/qlogging.cpp')
-rw-r--r-- | src/corelib/global/qlogging.cpp | 27 |
1 files changed, 1 insertions, 26 deletions
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() */ /*! @@ -2011,16 +2005,6 @@ void qErrnoWarning(int code, const char *msg, ...) */ /*! - \fn QtMsgHandler qInstallMsgHandler(QtMsgHandler handler) - \relates <QtGlobal> - \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 <QtGlobal> \since 5.0 @@ -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); |