diff options
author | David Faure <david.faure@kdab.com> | 2017-03-15 12:03:18 +0100 |
---|---|---|
committer | David Faure <david.faure@kdab.com> | 2017-03-20 12:55:36 +0000 |
commit | 035e0eafa607217f8110a492a9be7d0718e34907 (patch) | |
tree | c1b5edb88abf80969df0bd40faa27410e9a1ac7b /tests/auto | |
parent | 391e3aeef45efc937979b44c32147206e389a60b (diff) |
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 <shawn.rutledge@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'tests/auto')
-rw-r--r-- | tests/auto/corelib/io/qurl/tst_qurl.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
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)); |