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 /tests/auto/corelib/global/qlogging/tst_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 'tests/auto/corelib/global/qlogging/tst_qlogging.cpp')
-rw-r--r-- | tests/auto/corelib/global/qlogging/tst_qlogging.cpp | 39 |
1 files changed, 0 insertions, 39 deletions
diff --git a/tests/auto/corelib/global/qlogging/tst_qlogging.cpp b/tests/auto/corelib/global/qlogging/tst_qlogging.cpp index 6c6f3a2168..a7d7bea6b3 100644 --- a/tests/auto/corelib/global/qlogging/tst_qlogging.cpp +++ b/tests/auto/corelib/global/qlogging/tst_qlogging.cpp @@ -48,10 +48,6 @@ private slots: void defaultHandler(); void installMessageHandler(); -#if QT_DEPRECATED_SINCE(5, 0) - void installMsgHandler(); - void installBothHandler(); -#endif #ifdef QT_BUILD_INTERNAL void cleanupFuncinfo_data(); @@ -114,9 +110,6 @@ void tst_qmessagehandler::initTestCase() void tst_qmessagehandler::cleanup() { -#if QT_DEPRECATED_SINCE(5, 0) - qInstallMsgHandler(0); -#endif qInstallMessageHandler((QtMessageHandler)0); s_type = QtFatalMsg; s_file = 0; @@ -147,38 +140,6 @@ void tst_qmessagehandler::installMessageHandler() QCOMPARE((void*)myHandler, (void*)customMessageHandler); } -#if QT_DEPRECATED_SINCE(5, 0) -void tst_qmessagehandler::installMsgHandler() -{ - QtMsgHandler oldHandler = qInstallMsgHandler(customMsgHandler); - - qDebug("installMsgHandler"); - - QCOMPARE(s_type, QtDebugMsg); - QCOMPARE(s_message, QString::fromLocal8Bit("installMsgHandler")); - QCOMPARE(s_file, (const char*)0); - QCOMPARE(s_function, (const char*)0); - QCOMPARE(s_line, 0); - - QtMsgHandler myHandler = qInstallMsgHandler(oldHandler); - QCOMPARE((void*)myHandler, (void*)customMsgHandler); -} - -void tst_qmessagehandler::installBothHandler() -{ - qInstallMessageHandler(customMessageHandler); - qInstallMsgHandler(customMsgHandler); - - qDebug("installBothHandler"); int line = __LINE__; - - QCOMPARE(s_type, QtDebugMsg); - QCOMPARE(s_message, QString::fromLocal8Bit("installBothHandler")); - QCOMPARE(s_file, __FILE__); - QCOMPARE(s_function, Q_FUNC_INFO); - QCOMPARE(s_line, line); -} -#endif - # define ADD(x) QTest::newRow(x) << Q_FUNC_INFO << x; class TestClass1 |