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/io/qurl') 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 From 05924ddff901671063337f6e0e4bb84c915097ef Mon Sep 17 00:00:00 2001 From: David Faure Date: Tue, 21 Mar 2017 13:54:32 +0100 Subject: tst_qurl: skip test with ':' in filename, on Windows Task-number: QTBUG-59622 Change-Id: Ib4b458b5d0fc2dd9ea6758b8517a953f6d768a39 Reviewed-by: Liang Qi Reviewed-by: Shawn Rutledge --- tests/auto/corelib/io/qurl/tst_qurl.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'tests/auto/corelib/io/qurl') diff --git a/tests/auto/corelib/io/qurl/tst_qurl.cpp b/tests/auto/corelib/io/qurl/tst_qurl.cpp index ac5340a212..ebc240c285 100644 --- a/tests/auto/corelib/io/qurl/tst_qurl.cpp +++ b/tests/auto/corelib/io/qurl/tst_qurl.cpp @@ -3088,7 +3088,11 @@ void tst_QUrl::fromUserInputWithCwd_data() } // Existing files - for (const char *fileName : {"file.txt", "file#a.txt", "file .txt", "file.txt ", "file:colon.txt"}) { + for (const char *fileName : {"file.txt", "file#a.txt", "file .txt", "file.txt " +#ifndef Q_OS_WIN + , "file:colon.txt" +#endif + }) { const QString filePath = base + '/' + fileName; QFile file(filePath); QVERIFY2(file.open(QIODevice::WriteOnly), qPrintable(filePath)); -- cgit v1.2.3