summaryrefslogtreecommitdiffstats
path: root/tests/auto
diff options
context:
space:
mode:
authorSona Kurazyan <sona.kurazyan@qt.io>2019-08-01 12:24:06 +0200
committerSona Kurazyan <sona.kurazyan@qt.io>2019-08-01 13:51:18 +0200
commit10845315b714857c754c1de5360bba3b0386bdab (patch)
treee2c6c52da03f547105cdd6939bafb63991dc5eea /tests/auto
parentb80b2282401f6dc6b157daf9733457711dafaf82 (diff)
Conditionally disable parts of the tests testing the deprecated APIs
Somehow missed these during my first iteration. Change-Id: Iaef0ab84d9320a98f49ec071c93cd6f2907d92c3 Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
Diffstat (limited to 'tests/auto')
-rw-r--r--tests/auto/corelib/global/qlogging/tst_qlogging.cpp4
-rw-r--r--tests/auto/corelib/kernel/qvariant/tst_qvariant.cpp2
2 files changed, 4 insertions, 2 deletions
diff --git a/tests/auto/corelib/global/qlogging/tst_qlogging.cpp b/tests/auto/corelib/global/qlogging/tst_qlogging.cpp
index 7dd2a46807..17d0f86728 100644
--- a/tests/auto/corelib/global/qlogging/tst_qlogging.cpp
+++ b/tests/auto/corelib/global/qlogging/tst_qlogging.cpp
@@ -50,8 +50,8 @@ private slots:
void installMessageHandler();
#if QT_DEPRECATED_SINCE(5, 0)
void installMsgHandler();
-#endif
void installBothHandler();
+#endif
#ifdef QT_BUILD_INTERNAL
void cleanupFuncinfo_data();
@@ -163,7 +163,6 @@ void tst_qmessagehandler::installMsgHandler()
QtMsgHandler myHandler = qInstallMsgHandler(oldHandler);
QCOMPARE((void*)myHandler, (void*)customMsgHandler);
}
-#endif
void tst_qmessagehandler::installBothHandler()
{
@@ -178,6 +177,7 @@ void tst_qmessagehandler::installBothHandler()
QCOMPARE(s_function, Q_FUNC_INFO);
QCOMPARE(s_line, line);
}
+#endif
# define ADD(x) QTest::newRow(x) << Q_FUNC_INFO << x;
diff --git a/tests/auto/corelib/kernel/qvariant/tst_qvariant.cpp b/tests/auto/corelib/kernel/qvariant/tst_qvariant.cpp
index 5d06f6e8c8..074cb07092 100644
--- a/tests/auto/corelib/kernel/qvariant/tst_qvariant.cpp
+++ b/tests/auto/corelib/kernel/qvariant/tst_qvariant.cpp
@@ -379,11 +379,13 @@ void tst_QVariant::isNull()
QString str1;
QVariant var1( str1 );
QVERIFY( var1.isNull() );
+#if QT_DEPRECATED_SINCE(5, 9)
QT_WARNING_PUSH
QT_WARNING_DISABLE_DEPRECATED
QVariant var2( QString::null );
QT_WARNING_POP
QVERIFY( var2.isNull() );
+#endif
QVariant var3( QString( "blah" ) );
QVERIFY( !var3.isNull() );