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 <volker.hilsheimer@qt.io>
This commit is contained in:
Tor Arne Vestbø 2020-07-26 18:25:06 +02:00
parent 57337f21c7
commit dfeedc17a2
8 changed files with 16 additions and 0 deletions

View File

@ -27,6 +27,8 @@
****************************************************************************/
#include <QtTest/QtTest>
QT_WARNING_DISABLE_DEPRECATED
class tst_QFlags: public QObject
{
Q_OBJECT

View File

@ -27,6 +27,8 @@
****************************************************************************/
#include <QtTest/QtTest>
QT_WARNING_DISABLE_DEPRECATED
class tst_QRand: public QObject
{
Q_OBJECT

View File

@ -28,6 +28,8 @@
#include <QtTest>
QT_WARNING_DISABLE_DEPRECATED
#include "qjsonarray.h"
#include "qjsonobject.h"
#include "qjsonvalue.h"

View File

@ -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<QByteArray>("data");
@ -1312,6 +1314,7 @@ void tst_QStringConverter::utf8bom_data()
<< QString::fromUtf16(data, sizeof(data)/sizeof(short));
}
}
QT_WARNING_POP
void tst_QStringConverter::utf8bom()
{

View File

@ -29,6 +29,8 @@
#include "../../../../../src/corelib/tools/qalgorithms.h"
#include <QtTest/QtTest>
QT_WARNING_DISABLE_DEPRECATED
#include <iostream>
#include <iomanip>
#include <sstream>

View File

@ -30,6 +30,7 @@
#include <QtTest/QtTest>
#include <QDebug>
QT_WARNING_DISABLE_DEPRECATED
class tst_QMap : public QObject
{

View File

@ -28,6 +28,8 @@
#include <QtTest/QtTest>
QT_WARNING_DISABLE_DEPRECATED
#include <qcoreapplication.h>
#include <qdebug.h>
#include <qxml.h>

View File

@ -30,6 +30,8 @@
#include <qglobal.h>
QT_WARNING_DISABLE_DEPRECATED
#if QT_DEPRECATED_SINCE(5, 15)
#include <qfile.h>