diff options
| author | Sona Kurazyan <[email protected]> | 2019-11-07 17:26:55 +0100 |
|---|---|---|
| committer | Sona Kurazyan <[email protected]> | 2020-01-06 18:13:01 +0100 |
| commit | 82d02b7b95908dec16e41c5af1c63579729c589b (patch) | |
| tree | 6f78be54709ea918c63e265c61d236be88fbb1f0 /src/xml/dom/qdomhelpers_p.h | |
| parent | 844ef184e8021237280a45ead04a3ab39cefa657 (diff) | |
Deprecate SAX classes in Qt XML
Deprecated the SAX classes and disabled or replaced their uses in
tests if applicable.
Removed the saxbookmarks example, no point in keeping examples for
the deprecated code.
[ChangeLog][QtXml] SAX classes are now deprecated. Use QXmlStreamReader,
QXmlStreamWriter in QtCore instead.
Task-number: QTBUG-76177
Change-Id: Ic171d62fa0527b0f36f94cf09a69586092269957
Reviewed-by: Friedemann Kleint <[email protected]>
Reviewed-by: Paul Wicking <[email protected]>
Reviewed-by: Kai Koehne <[email protected]>
Diffstat (limited to 'src/xml/dom/qdomhelpers_p.h')
| -rw-r--r-- | src/xml/dom/qdomhelpers_p.h | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/src/xml/dom/qdomhelpers_p.h b/src/xml/dom/qdomhelpers_p.h index f5efd8a42df..4de18f7d4dd 100644 --- a/src/xml/dom/qdomhelpers_p.h +++ b/src/xml/dom/qdomhelpers_p.h @@ -93,6 +93,11 @@ private: QXmlStreamReader *reader; }; +#if QT_DEPRECATED_SINCE(5, 15) + +QT_WARNING_PUSH +QT_WARNING_DISABLE_DEPRECATED + class QSAXDocumentLocator : public QXmlDocumentLocator { public: @@ -107,6 +112,10 @@ private: QXmlLocator *locator = nullptr; }; +QT_WARNING_POP + +#endif + /************************************************************** * * QDomBuilder @@ -120,7 +129,12 @@ public: ~QDomBuilder(); bool endDocument(); +#if QT_DEPRECATED_SINCE(5, 15) +QT_WARNING_PUSH +QT_WARNING_DISABLE_DEPRECATED bool startElement(const QString &nsURI, const QString &qName, const QXmlAttributes &atts); +QT_WARNING_POP +#endif bool startElement(const QString &nsURI, const QString &qName, const QXmlStreamAttributes &atts); bool endElement(); bool characters(const QString &characters, bool cdata = false); @@ -152,12 +166,17 @@ private: bool nsProcessing; }; +#if QT_DEPRECATED_SINCE(5, 15) + /************************************************************** * * QDomHandler * **************************************************************/ +QT_WARNING_PUSH +QT_WARNING_DISABLE_DEPRECATED + class QDomHandler : public QXmlDefaultHandler { public: @@ -205,6 +224,10 @@ private: QDomBuilder domBuilder; }; +QT_WARNING_POP + +#endif // QT_DEPRECATED_SINCE(5, 15) + /************************************************************** * * QDomParser |
