summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEirik Aavitsland <eirik.aavitsland@qt.io>2017-08-16 13:11:12 +0200
committerOswald Buddenhagen <oswald.buddenhagen@qt.io>2017-08-16 12:53:13 +0000
commitfee0795ca96079a8f37473d3aec18757d1e52d24 (patch)
treeafc26db8f8198c5e4fe4a7f5aa344f44f0acc8c5
parent6c3e2a572ffda86012edaad05b6fca451d8abe80 (diff)
downloadqtxmlpatterns-fee0795ca96079a8f37473d3aec18757d1e52d24.tar.gz
Fix autotest failure in tst_QXmlQuery::relativeBaseURI()v5.10.0-alpha1
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 <lars.knoll@qt.io>
-rw-r--r--tests/auto/qxmlquery/tst_qxmlquery.cpp7
1 files 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