diff options
author | Sona Kurazyan <sona.kurazyan@qt.io> | 2019-11-22 17:41:08 +0100 |
---|---|---|
committer | Sona Kurazyan <sona.kurazyan@qt.io> | 2019-12-18 17:22:11 +0100 |
commit | 3839255e1c11c78046896a37948cda849b0c5bc8 (patch) | |
tree | ba56e4d0074536b356b03b28c2289cd1bc87d6c7 /tests/auto/xmlpatternssdk/TestBaseLine.cpp | |
parent | 0e44a69b3546f259cd01bac1a5d10e86b287eb45 (diff) | |
download | qtxmlpatterns-3839255e1c11c78046896a37948cda849b0c5bc8.tar.gz |
Stop using SAX classes for writing XML in tests
Removed the dependency of XMLWriter from QXmlContentHandler and
QXmlLexicalHandler which are about to be deprecated. There's no need
in inheriting from these interfaces, the tests call the methods of
XMLWriter directly via XMLWriter instance.
Task-number: QTBUG-76177
Change-Id: I2fe237b962774a004a9014f3dab1b5de5072f180
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Diffstat (limited to 'tests/auto/xmlpatternssdk/TestBaseLine.cpp')
-rw-r--r-- | tests/auto/xmlpatternssdk/TestBaseLine.cpp | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/tests/auto/xmlpatternssdk/TestBaseLine.cpp b/tests/auto/xmlpatternssdk/TestBaseLine.cpp index 78232cd..f8ad128 100644 --- a/tests/auto/xmlpatternssdk/TestBaseLine.cpp +++ b/tests/auto/xmlpatternssdk/TestBaseLine.cpp @@ -127,11 +127,9 @@ void TestBaseLine::toXML(XMLWriter &receiver) const case SchemaIsValid: /* Fallthrough. */ case Text: { - QXmlAttributes inspectAtts; - inspectAtts.append(QLatin1String("role"), QString(), - QLatin1String("role"), QLatin1String("principal")); - inspectAtts.append(QLatin1String("compare"), QString(), - QLatin1String("compare"), displayName(m_type)); + QXmlStreamAttributes inspectAtts; + inspectAtts.append(QLatin1String("role"), QLatin1String("principal")); + inspectAtts.append(QLatin1String("compare"), displayName(m_type)); receiver.startElement(QLatin1String("output-file"), inspectAtts); receiver.characters(m_details); receiver.endElement(QLatin1String("output-file")); @@ -144,11 +142,9 @@ void TestBaseLine::toXML(XMLWriter &receiver) const } case Inspect: { - QXmlAttributes inspectAtts; - inspectAtts.append(QLatin1String("role"), QString(), - QLatin1String("role"), QLatin1String("principal")); - inspectAtts.append(QLatin1String("compare"), QString(), - QLatin1String("compare"), QLatin1String("Inspect")); + QXmlStreamAttributes inspectAtts; + inspectAtts.append(QLatin1String("role"), QLatin1String("principal")); + inspectAtts.append(QLatin1String("compare"), QLatin1String("Inspect")); receiver.startElement(QLatin1String("output-file"), inspectAtts); receiver.characters(m_details); receiver.endElement(QLatin1String("output-file")); |