summaryrefslogtreecommitdiffstats
path: root/tests/auto
diff options
context:
space:
mode:
authorDavid Faure <david.faure@kdab.com>2017-02-21 15:08:45 +0100
committerDavid Faure <david.faure@kdab.com>2017-02-23 18:12:35 +0000
commit9ffc9e306f639b005dafd67faa122ad0db1b7b86 (patch)
treed06528cc1a267ec5ec8d58e925a0adc508db19ea /tests/auto
parent8cb9314971cdc61137855a6b374b4a4468dff7e7 (diff)
QUrl::fromUserInput(with cwd) fix handling of files with trailing spaces
The call to trimmed() makes sense for URLs typed in a browser's location bar, but its use in every code path made it impossible to open a file with a trailing space in command-line tools that uses fromUserInput(cwd) to handle command-line arguments, as recommended. For instance kde-open5 "file.txt " would fail. Change-Id: Ie61182684521d91f077d3e76f95b7240965ab405 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'tests/auto')
-rw-r--r--tests/auto/corelib/io/qurl/tst_qurl.cpp2
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 e0e6c6f281..ee18151e4a 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"}) {
+ for (const char *fileName : {"file.txt", "file#a.txt", "file .txt", "file.txt "}) {
const QString filePath = base + '/' + fileName;
QFile file(filePath);
QVERIFY2(file.open(QIODevice::WriteOnly), qPrintable(filePath));