diff options
author | Leander Beernaert <leander.beernaert@qt.io> | 2020-01-22 13:47:08 +0100 |
---|---|---|
committer | Leander Beernaert <leander.beernaert@qt.io> | 2020-01-24 13:17:33 +0100 |
commit | 502d3d6744913899da87acfda5ebdab42c40329e (patch) | |
tree | 16658a328503bfd5a62b4fd5d69ffb66e9854b18 /tests/auto/xml/sax | |
parent | d1be8b9ceb2c7b20bbe53a07154c79699540ea3d (diff) | |
parent | 06bb315beb6c2c398223cfe52cbc7f66e14a8557 (diff) |
Merge remote-tracking branch 'origin/dev' into merge-dev
Change-Id: I31b761cfd5ea01373c60d02a5da8c33398d34739
Diffstat (limited to 'tests/auto/xml/sax')
5 files changed, 38 insertions, 4 deletions
diff --git a/tests/auto/xml/sax/qxml/tst_qxml.cpp b/tests/auto/xml/sax/qxml/tst_qxml.cpp index 1cdb9701fa..db6584edda 100644 --- a/tests/auto/xml/sax/qxml/tst_qxml.cpp +++ b/tests/auto/xml/sax/qxml/tst_qxml.cpp @@ -26,7 +26,6 @@ ** ****************************************************************************/ - #include <QtTest/QtTest> #include <qcoreapplication.h> @@ -38,13 +37,17 @@ class tst_QXml : public QObject Q_OBJECT private slots: +#if QT_DEPRECATED_SINCE(5, 15) void getSetCheck(); void interpretedAs0D() const; #ifndef QT_NO_EXCEPTIONS void exception(); #endif +#endif // QT_DEPRECATED_SINCE(5, 15) }; +#if QT_DEPRECATED_SINCE(5, 15) + class MyXmlEntityResolver : public QXmlEntityResolver { public: @@ -225,5 +228,7 @@ void tst_QXml::exception() } #endif +#endif // QT_DEPRECATED_SINCE(5, 15) + QTEST_MAIN(tst_QXml) #include "tst_qxml.moc" diff --git a/tests/auto/xml/sax/qxmlinputsource/tst_qxmlinputsource.cpp b/tests/auto/xml/sax/qxmlinputsource/tst_qxmlinputsource.cpp index d40c8c2fd6..5dce69bd8c 100644 --- a/tests/auto/xml/sax/qxmlinputsource/tst_qxmlinputsource.cpp +++ b/tests/auto/xml/sax/qxmlinputsource/tst_qxmlinputsource.cpp @@ -45,13 +45,18 @@ class tst_QXmlInputSource : public QObject { Q_OBJECT +#if QT_DEPRECATED_SINCE(5, 15) private slots: void reset() const; void resetSimplified() const; void waitForReadyIODevice() const; void inputFromSlowDevice() const; +#endif // QT_DEPRECATED_SINCE(5, 15) }; +#if QT_DEPRECATED_SINCE(5, 15) +QT_WARNING_PUSH +QT_WARNING_DISABLE_DEPRECATED /*! \internal \since 4.4 @@ -144,7 +149,7 @@ public slots: void requestFinished(QNetworkReply *reply) { - QCOMPARE(reply->error(), QNetworkReply::NoError); + QCOMPARE(reply->networkError(), QNetworkReply::NoError); reply->deleteLater(); } @@ -292,5 +297,8 @@ void tst_QXmlInputSource::inputFromSlowDevice() const QCOMPARE(data, expectedData); } +QT_WARNING_POP +#endif // QT_DEPRECATED_SINCE(5, 15) + QTEST_MAIN(tst_QXmlInputSource) #include "tst_qxmlinputsource.moc" diff --git a/tests/auto/xml/sax/qxmlsimplereader/parser/parser.cpp b/tests/auto/xml/sax/qxmlsimplereader/parser/parser.cpp index 556603a681..44f8101955 100644 --- a/tests/auto/xml/sax/qxmlsimplereader/parser/parser.cpp +++ b/tests/auto/xml/sax/qxmlsimplereader/parser/parser.cpp @@ -26,12 +26,15 @@ ** ****************************************************************************/ +#include "parser.h" + +#if QT_DEPRECATED_SINCE(5, 15) #include <qxml.h> #include <qregularexpression.h> -#include "parser.h" - +QT_WARNING_PUSH +QT_WARNING_DISABLE_DEPRECATED class ContentHandler : public QXmlDefaultHandler { public: @@ -440,3 +443,6 @@ QString Parser::errorMsg() const { return handler->errorMsg(); } + +QT_WARNING_POP +#endif // QT_DEPRECATED_SINCE(5, 15) diff --git a/tests/auto/xml/sax/qxmlsimplereader/parser/parser.h b/tests/auto/xml/sax/qxmlsimplereader/parser/parser.h index 604678f06b..9c51cdf095 100644 --- a/tests/auto/xml/sax/qxmlsimplereader/parser/parser.h +++ b/tests/auto/xml/sax/qxmlsimplereader/parser/parser.h @@ -28,6 +28,10 @@ #ifndef PARSER_H #define PARSER_H +#include <qglobal.h> + +#if QT_DEPRECATED_SINCE(5, 15) + #include <qfile.h> #include <qstring.h> #include <qxml.h> @@ -48,4 +52,6 @@ private: ContentHandler *handler; }; +#endif // QT_DEPRECATED_SINCE(5, 15) + #endif diff --git a/tests/auto/xml/sax/qxmlsimplereader/tst_qxmlsimplereader.cpp b/tests/auto/xml/sax/qxmlsimplereader/tst_qxmlsimplereader.cpp index 8c4c6c7179..cea4e3c8b8 100644 --- a/tests/auto/xml/sax/qxmlsimplereader/tst_qxmlsimplereader.cpp +++ b/tests/auto/xml/sax/qxmlsimplereader/tst_qxmlsimplereader.cpp @@ -127,6 +127,7 @@ class tst_QXmlSimpleReader : public QObject { Q_OBJECT +#if QT_DEPRECATED_SINCE(5, 15) public: tst_QXmlSimpleReader(); ~tst_QXmlSimpleReader(); @@ -157,8 +158,13 @@ class tst_QXmlSimpleReader : public QObject static QDomDocument fromByteArray(const QString &title, const QByteArray &ba, bool *ok); XmlServer *server; QString prefix; +#endif // QT_DEPRECATED_SINCE(5, 15) }; +#if QT_DEPRECATED_SINCE(5, 15) +QT_WARNING_PUSH +QT_WARNING_DISABLE_DEPRECATED + tst_QXmlSimpleReader::tst_QXmlSimpleReader() : server(new XmlServer(this)) { server->start(); @@ -820,5 +826,8 @@ void tst_QXmlSimpleReader::dtdRecursionLimit() } } +QT_WARNING_POP +#endif // QT_DEPRECATED_SINCE(5, 15) + QTEST_MAIN(tst_QXmlSimpleReader) #include "tst_qxmlsimplereader.moc" |