From dfeedc17a25d8d2fdc4e52927e7c34f1ff045c32 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tor=20Arne=20Vestb=C3=B8?= Date: Sun, 26 Jul 2020 18:25:06 +0200 Subject: Disable deprecation warnings in some tests The tests are testing deprecated functionality, which we still want to test. Change-Id: Iad6ed35800896170c17fe019c7a6ecda22398ac3 Reviewed-by: Volker Hilsheimer --- tests/auto/corelib/global/qflags/tst_qflags.cpp | 2 ++ tests/auto/corelib/global/qrand/tst_qrand.cpp | 2 ++ tests/auto/corelib/serialization/json/tst_qtjson.cpp | 2 ++ tests/auto/corelib/text/qstringconverter/tst_qstringconverter.cpp | 3 +++ tests/auto/corelib/tools/qalgorithms/tst_qalgorithms.cpp | 2 ++ tests/auto/corelib/tools/qmap/tst_qmap.cpp | 1 + tests/auto/xml/sax/qxml/tst_qxml.cpp | 2 ++ tests/auto/xml/sax/qxmlsimplereader/parser/parser.h | 2 ++ 8 files changed, 16 insertions(+) diff --git a/tests/auto/corelib/global/qflags/tst_qflags.cpp b/tests/auto/corelib/global/qflags/tst_qflags.cpp index 7060fc8b31..56319f215d 100644 --- a/tests/auto/corelib/global/qflags/tst_qflags.cpp +++ b/tests/auto/corelib/global/qflags/tst_qflags.cpp @@ -27,6 +27,8 @@ ****************************************************************************/ #include +QT_WARNING_DISABLE_DEPRECATED + class tst_QFlags: public QObject { Q_OBJECT diff --git a/tests/auto/corelib/global/qrand/tst_qrand.cpp b/tests/auto/corelib/global/qrand/tst_qrand.cpp index 6a4b2b322b..279f4e0a34 100644 --- a/tests/auto/corelib/global/qrand/tst_qrand.cpp +++ b/tests/auto/corelib/global/qrand/tst_qrand.cpp @@ -27,6 +27,8 @@ ****************************************************************************/ #include +QT_WARNING_DISABLE_DEPRECATED + class tst_QRand: public QObject { Q_OBJECT diff --git a/tests/auto/corelib/serialization/json/tst_qtjson.cpp b/tests/auto/corelib/serialization/json/tst_qtjson.cpp index abe1b069e7..0cc38e0845 100644 --- a/tests/auto/corelib/serialization/json/tst_qtjson.cpp +++ b/tests/auto/corelib/serialization/json/tst_qtjson.cpp @@ -28,6 +28,8 @@ #include +QT_WARNING_DISABLE_DEPRECATED + #include "qjsonarray.h" #include "qjsonobject.h" #include "qjsonvalue.h" diff --git a/tests/auto/corelib/text/qstringconverter/tst_qstringconverter.cpp b/tests/auto/corelib/text/qstringconverter/tst_qstringconverter.cpp index 5de3beff77..9c2f5badc6 100644 --- a/tests/auto/corelib/text/qstringconverter/tst_qstringconverter.cpp +++ b/tests/auto/corelib/text/qstringconverter/tst_qstringconverter.cpp @@ -1262,6 +1262,8 @@ void tst_QStringConverter::utf8Codec() QCOMPARE(str, res); } +QT_WARNING_PUSH +QT_WARNING_DISABLE_DEPRECATED void tst_QStringConverter::utf8bom_data() { QTest::addColumn("data"); @@ -1312,6 +1314,7 @@ void tst_QStringConverter::utf8bom_data() << QString::fromUtf16(data, sizeof(data)/sizeof(short)); } } +QT_WARNING_POP void tst_QStringConverter::utf8bom() { diff --git a/tests/auto/corelib/tools/qalgorithms/tst_qalgorithms.cpp b/tests/auto/corelib/tools/qalgorithms/tst_qalgorithms.cpp index 078351f388..964c68c9e9 100644 --- a/tests/auto/corelib/tools/qalgorithms/tst_qalgorithms.cpp +++ b/tests/auto/corelib/tools/qalgorithms/tst_qalgorithms.cpp @@ -29,6 +29,8 @@ #include "../../../../../src/corelib/tools/qalgorithms.h" #include +QT_WARNING_DISABLE_DEPRECATED + #include #include #include diff --git a/tests/auto/corelib/tools/qmap/tst_qmap.cpp b/tests/auto/corelib/tools/qmap/tst_qmap.cpp index 397e2b6ba6..b812eb89a1 100644 --- a/tests/auto/corelib/tools/qmap/tst_qmap.cpp +++ b/tests/auto/corelib/tools/qmap/tst_qmap.cpp @@ -30,6 +30,7 @@ #include #include +QT_WARNING_DISABLE_DEPRECATED class tst_QMap : public QObject { diff --git a/tests/auto/xml/sax/qxml/tst_qxml.cpp b/tests/auto/xml/sax/qxml/tst_qxml.cpp index db6584edda..2f00a08fef 100644 --- a/tests/auto/xml/sax/qxml/tst_qxml.cpp +++ b/tests/auto/xml/sax/qxml/tst_qxml.cpp @@ -28,6 +28,8 @@ #include +QT_WARNING_DISABLE_DEPRECATED + #include #include #include diff --git a/tests/auto/xml/sax/qxmlsimplereader/parser/parser.h b/tests/auto/xml/sax/qxmlsimplereader/parser/parser.h index 9c51cdf095..eed4c7517e 100644 --- a/tests/auto/xml/sax/qxmlsimplereader/parser/parser.h +++ b/tests/auto/xml/sax/qxmlsimplereader/parser/parser.h @@ -30,6 +30,8 @@ #include +QT_WARNING_DISABLE_DEPRECATED + #if QT_DEPRECATED_SINCE(5, 15) #include -- cgit v1.2.3