diff options
Diffstat (limited to 'tests/auto/xml/sax/qxmlsimplereader/parser')
-rw-r--r-- | tests/auto/xml/sax/qxmlsimplereader/parser/parser.cpp | 10 | ||||
-rw-r--r-- | tests/auto/xml/sax/qxmlsimplereader/parser/parser.h | 6 |
2 files changed, 14 insertions, 2 deletions
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 |