diff options
author | Qt Forward Merge Bot <qt_forward_merge_bot@qt-project.org> | 2020-01-21 03:04:51 +0100 |
---|---|---|
committer | Qt Forward Merge Bot <qt_forward_merge_bot@qt-project.org> | 2020-01-21 03:04:52 +0100 |
commit | ff18ac06286c453acfd3929ebc806229cd1eb69f (patch) | |
tree | 20e62c671f0aed3695da7148f28f685daa008ed2 /tests/auto/xmlpatternssdk/TestResultHandler.cpp | |
parent | 3ab7db4af2f6fba953454e8bcd6ee982198637ae (diff) | |
parent | e263fec484d23fc2e652f538f39934b5364339e1 (diff) | |
download | qtxmlpatterns-ff18ac06286c453acfd3929ebc806229cd1eb69f.tar.gz |
Merge remote-tracking branch 'origin/5.15' into dev
Change-Id: Ia0f79b0c59c6339e471533b644f40995d8c4df37
Diffstat (limited to 'tests/auto/xmlpatternssdk/TestResultHandler.cpp')
-rw-r--r-- | tests/auto/xmlpatternssdk/TestResultHandler.cpp | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/tests/auto/xmlpatternssdk/TestResultHandler.cpp b/tests/auto/xmlpatternssdk/TestResultHandler.cpp index 92f0c01..d578f3a 100644 --- a/tests/auto/xmlpatternssdk/TestResultHandler.cpp +++ b/tests/auto/xmlpatternssdk/TestResultHandler.cpp @@ -41,10 +41,8 @@ TestResultHandler::TestResultHandler() m_comments.reserve(1000); /* Comments are only used for stuff that crash, more or less. */ } -bool TestResultHandler::startElement(const QString &namespaceURI, - const QString &localName, - const QString &, - const QXmlAttributes &atts) +bool TestResultHandler::startElement(const QStringRef &namespaceURI, const QStringRef &localName, + const QStringRef &, const QXmlStreamAttributes &atts) { /* We only care about 'test-case', ignore everything else. */ if(localName != QLatin1String("test-case") || @@ -55,12 +53,13 @@ bool TestResultHandler::startElement(const QString &namespaceURI, Q_ASSERT_X(atts.count() == 2 || atts.count() == 3, Q_FUNC_INFO, "The input appears to not conform to XQTSResult.xsd"); - Q_ASSERT_X(!m_result.contains(atts.value(QLatin1String("name"))), - Q_FUNC_INFO, + Q_ASSERT_X(!m_result.contains(atts.value(QLatin1String("name")).toString()), Q_FUNC_INFO, qPrintable(QString::fromLatin1("A test result for test case %1 has " - "already been read(duplicate entry it seems).").arg(atts.value(QLatin1String("name"))))); + "already been read(duplicate entry it seems).") + .arg(atts.value(QLatin1String("name"))))); - m_result.insert(atts.value(0), TestResult::statusFromString(atts.value(QLatin1String("result")))); + m_result.insert(atts.at(0).value().toString(), + TestResult::statusFromString(atts.value(QLatin1String("result")).toString())); return true; } |