From fee0795ca96079a8f37473d3aec18757d1e52d24 Mon Sep 17 00:00:00 2001 From: Eirik Aavitsland Date: Wed, 16 Aug 2017 13:11:12 +0200 Subject: Fix autotest failure in tst_QXmlQuery::relativeBaseURI() The test (mis)used undocumented QFileInfo behavior, which was changed in qtbase 6504bc6bbc9276fe1a26c1af53c202371f334416. Fix the test to use the proper QFileInfo call. Task-number: QTBUG-62547 Change-Id: Ia95b6a4c471053a9cf8a17afac948771ca1b64c8 Reviewed-by: Lars Knoll --- tests/auto/qxmlquery/tst_qxmlquery.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/tests/auto/qxmlquery/tst_qxmlquery.cpp b/tests/auto/qxmlquery/tst_qxmlquery.cpp index a7f3e8b..df4b955 100644 --- a/tests/auto/qxmlquery/tst_qxmlquery.cpp +++ b/tests/auto/qxmlquery/tst_qxmlquery.cpp @@ -1391,13 +1391,12 @@ void tst_QXmlQuery::relativeBaseURI() const QVERIFY(!appPath.isRelative()); QFileInfo dir(appPath.toLocalFile()); - dir.setFile(QString()); /* We can't use QUrl::isParentOf() because it doesn't do what we want it to */ - if(!loaded.toLocalFile().startsWith(dir.absoluteFilePath())) - QTextStream(stderr) << "dir.absoluteFilePath():" << dir.absoluteFilePath() << "loaded.toLocalFile():" << loaded.toLocalFile(); + if (!loaded.toLocalFile().startsWith(dir.absolutePath())) + QTextStream(stderr) << "dir.absolutePath():" << dir.absolutePath() << "loaded.toLocalFile():" << loaded.toLocalFile(); - checkBaseURI(loaded, dir.absoluteFilePath()); + checkBaseURI(loaded, dir.absolutePath()); } void tst_QXmlQuery::emptyBaseURI() const -- cgit v1.2.1