From 3839255e1c11c78046896a37948cda849b0c5bc8 Mon Sep 17 00:00:00 2001 From: Sona Kurazyan Date: Fri, 22 Nov 2019 17:41:08 +0100 Subject: 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 --- tests/auto/xmlpatternssdk/TestBaseLine.cpp | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) (limited to 'tests/auto/xmlpatternssdk/TestBaseLine.cpp') 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")); -- cgit v1.2.1