From 035e0eafa607217f8110a492a9be7d0718e34907 Mon Sep 17 00:00:00 2001 From: David Faure Date: Wed, 15 Mar 2017 12:03:18 +0100 Subject: QUrl::fromUserInput: fix handling of files with a ':' in the name QUrl::isRelative(str) would be false for such files, so first check for file existence before doing any URL parsing. Change-Id: I51b6229251ad94877ac408b2f8018456d3e10a36 Reviewed-by: Shawn Rutledge Reviewed-by: Thiago Macieira --- tests/auto/corelib/io/qurl/tst_qurl.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tests/auto/corelib') diff --git a/tests/auto/corelib/io/qurl/tst_qurl.cpp b/tests/auto/corelib/io/qurl/tst_qurl.cpp index ee18151e4a..ac5340a212 100644 --- a/tests/auto/corelib/io/qurl/tst_qurl.cpp +++ b/tests/auto/corelib/io/qurl/tst_qurl.cpp @@ -3088,7 +3088,7 @@ void tst_QUrl::fromUserInputWithCwd_data() } // Existing files - for (const char *fileName : {"file.txt", "file#a.txt", "file .txt", "file.txt "}) { + for (const char *fileName : {"file.txt", "file#a.txt", "file .txt", "file.txt ", "file:colon.txt"}) { const QString filePath = base + '/' + fileName; QFile file(filePath); QVERIFY2(file.open(QIODevice::WriteOnly), qPrintable(filePath)); -- cgit v1.2.3