summaryrefslogtreecommitdiffstats
path: root/tests/auto/corelib/io/qurl/tst_qurl.cpp
Commit message (Collapse)AuthorAgeFilesLines
* QUrl: Use new comparison helper macrosRym Bouabid2024-03-061-8/+16
| | | | | | | | | | | | | | | | The class had operator==(), operator!=() and operator <() defined as public member functions, so use QT_CORE_REMOVED_SINCE and removed_api.cpp to get rid of these methods and replace them with hidden friends. Use QT_TEST_ALL_EQUALITY_OPS macro in unit-tests. Use new \compares command in the documentation to describe the comparison operators provided by QUrl. Task-number: QTBUG-120303 Change-Id: Ic4fa2335292cc4b75ad2373832c0b89d768f529c Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Change license for tests filesLucie Gérard2024-02-041-1/+1
| | | | | | | | | | | | According to QUIP-18 [1], all tests file should be LicenseRef-Qt-Commercial OR GPL-3.0-only [1]: https://contribute.qt-project.org/quips/18 Pick-to: 6.7 Task-number: QTBUG-121787 Change-Id: I9657df5d660820e56c96d511ea49d321c54682e8 Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
* Corelib: s/Q_OS_MAC/Q_OS_DARWIN/wg except for doc and definitionEdward Welbourne2023-03-201-1/+1
| | | | | | | | | | I got tired of being told off by the inanity 'bot for faithfully reflecting existing #if-ery in new #if-ery. Retain only the documentation and definition of the deprecated define. Change-Id: I47f47b76bd239a360f27ae5afe593dfad8746538 Reviewed-by: Ahmad Samir <a.samirh78@gmail.com> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* QUrl: restore empty-but-not-null for components that are presentThiago Macieira2023-01-171-39/+43
| | | | | | | | | | | | | This got lost during the QStringView port that happend in Qt 6.0 (commit 548dcef08976649c820054f3db1ad108c72439cd) because QString::operator+=(QStringView) does not copy the nullness of the right side, whereas QString::operator+=(const QString &) does. Pick-to: 6.2 6.4 6.5 Fixes: QTBUG-84315 Change-Id: Ide4dbd0777a44ed0870efffd17399b772d34fd55 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* Port from container::count() and length() to size() - V5Marc Mutz2022-11-031-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a semantic patch using ClangTidyTransformator as in qtbase/df9d882d41b741fef7c5beeddb0abe9d904443d8, but extended to handle typedefs and accesses through pointers, too: const std::string o = "object"; auto hasTypeIgnoringPointer = [](auto type) { return anyOf(hasType(type), hasType(pointsTo(type))); }; auto derivedFromAnyOfClasses = [&](ArrayRef<StringRef> classes) { auto exprOfDeclaredType = [&](auto decl) { return expr(hasTypeIgnoringPointer(hasUnqualifiedDesugaredType(recordType(hasDeclaration(decl))))).bind(o); }; return exprOfDeclaredType(cxxRecordDecl(isSameOrDerivedFrom(hasAnyName(classes)))); }; auto renameMethod = [&] (ArrayRef<StringRef> classes, StringRef from, StringRef to) { return makeRule(cxxMemberCallExpr(on(derivedFromAnyOfClasses(classes)), callee(cxxMethodDecl(hasName(from), parameterCountIs(0)))), changeTo(cat(access(o, cat(to)), "()")), cat("use '", to, "' instead of '", from, "'")); }; renameMethod(<classes>, "count", "size"); renameMethod(<classes>, "length", "size"); except that the on() matcher has been replaced by one that doesn't ignoreParens(). a.k.a qt-port-to-std-compatible-api V5 with config Scope: 'Container'. Added two NOLINTNEXTLINEs in tst_qbitarray and tst_qcontiguouscache, to avoid porting calls that explicitly test count(). Change-Id: Icfb8808c2ff4a30187e9935a51cad26987451c22 Reviewed-by: Ivan Solovev <ivan.solovev@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* tst_QUrl::fromUserInput(): distinguish to data rows by name tagEdward Welbourne2022-10-111-2/+4
| | | | | Change-Id: Ia3d232466ae618c26b95a6c33b094b197a2e4ec8 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* tst_QUrl: distinguish two ipvfuture test-case data tagsEdward Welbourne2022-10-111-2/+2
| | | | | Change-Id: I20e318b4c17c35aae5f5440b2fd9c6e0af7c4a70 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Port from container.count()/length() to size()Marc Mutz2022-10-041-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is semantic patch using ClangTidyTransformator: auto QtContainerClass = expr(hasType(namedDecl(hasAnyName(<classes>)))).bind(o) makeRule(cxxMemberCallExpr(on(QtContainerClass), callee(cxxMethodDecl(hasAnyName({"count", "length"), parameterCountIs(0))))), changeTo(cat(access(o, cat("size"), "()"))), cat("use 'size()' instead of 'count()/length()'")) a.k.a qt-port-to-std-compatible-api with config Scope: 'Container'. <classes> are: // sequential: "QByteArray", "QList", "QQueue", "QStack", "QString", "QVarLengthArray", "QVector", // associative: "QHash", "QMultiHash", "QMap", "QMultiMap", "QSet", // Qt has no QMultiSet Change-Id: Ibe8837be96e8d30d1846881ecd65180c1bc459af Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Use SPDX license identifiersLucie Gérard2022-05-161-28/+3
| | | | | | | | | | | | | Replace the current license disclaimer in files by a SPDX-License-Identifier. Files that have to be modified by hand are modified. License files are organized under LICENSES directory. Task-number: QTBUG-67283 Change-Id: Id880c92784c40f3bbde861c0d93f58151c18b9f1 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
* Replace uses of _qs with _s in testsSona Kurazyan2022-04-071-1/+3
| | | | | | Task-number: QTBUG-101408 Change-Id: If092a68828a1e8056259cf90d035d9a87989244b Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* Workaround MSVC 2022 bug about QString::replaceAndreas Buhr2021-11-101-2/+5
| | | | | | | | | | | | MSVC 2022 (17.0.0) complains about "'QString::replace': 12 overloads have no legal conversion for 'this' pointer". This is a compiler bug. It is reported to MS. Still we workaround it here so that qtbase can be built with MSVC 2022. Pick-to: 6.2 Task-number: QTBUG-96975 Change-Id: I0180e2e6760d2809ca61e3cd8f02b04f970172a7 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* tst_qurl{,internal}: Use U+FB01 for normalization to ASCII test casesIevgenii Meshcheriakov2021-08-251-2/+3
| | | | | | | | | | | | Use U+FB01 LATIN SMALL LIGATURE FI instead of U+00DF LATIN SMALL LETTER SHARP S in testcases that need non-ASCII URLs that are normalized to ASCII. The latter is not normalized to ASCII when using UTS #46 nontransitional processing. Task-number: QTBUG-85371 Change-Id: I8c153feb58e556b1d31439018cc84d8e8f1de1a7 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* tst_qurl: Make an invalid URL test compatible with UTS #46Ievgenii Meshcheriakov2021-08-251-3/+4
| | | | | | | | | | | Use U+1F100 DIGIT ZERO FULL STOP instead of U+1F4D9 ORANGE BOOK. The latter is not allowed according to IDNA 2003 rules but is allowed according to UTS #46 rules. The former is disallowed in either case. Task-number: QTBUG-85371 Change-Id: Idc8afef68c26ae0b702a475e5a53592182998a08 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* Fix QUrl::fromLocalFile with long path prefixKarsten Heimrich2021-05-191-0/+4
| | | | | | | | | | | | After commit 3966b571 the function was kinda broken already, though this got unnoticed since it was not covered by an the auto-test. This commit adds another test case with Windows native separators and removes the use of QDir::fromNativeSeparators. Instead use the original code from QDir::fromNativeSeparators to replace the backslashes. Pick-to: 5.15 6.0 6.1 Change-Id: I190560d0e75cb8c177d63b142aa4be5b01498da2 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Skip tst_QUrl::testThreading() under QEMUAndrei Golubev2021-04-271-0/+4
| | | | | | | | | | | | It usually fails the test with "corrupted size vs. prev_size" message coming from malloc() or some other memory allocation routine (which signals about memory corruption probably) Task-number: QTBUG-93176 Change-Id: I5e34971267c52c63cda2489bef5b09bed739f532 Reviewed-by: Lars Knoll <lars.knoll@qt.io> (cherry picked from commit 6d52d86b999088ec07e58c14197bddda043ef0aa) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Replace QtTest headers with QTestDavid Skoland2020-12-221-1/+3
| | | | | | | | | | | Complete search and replace of QtTest and QtTest/QtTest with QTest, as QtTest includes the whole module. Replace all such instances with correct header includes. See Jira task for more discussion. Fixes: QTBUG-88831 Change-Id: I981cfae18a1cabcabcabee376016b086d9d01f44 Pick-to: 6.0 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* QUrl: fix parsing of empty IPv6 addressesThiago Macieira2020-12-091-0/+2
| | | | | | | | There's an assertion. Found by Google fuzz scan of CBOR data. Pick-to: 6.0 5.15 Change-Id: I55083c2909f64a1f8868fffd164f1ff3af71605b Reviewed-by: David Faure <david.faure@kdab.com>
* QUrl::fromLocalFile: accept invalid hostnamesThiago Macieira2020-10-051-0/+15
| | | | | | | | | | | | | | | | | | | | QUrl hostnames must be compliant with STD3, but we must somehow accept file paths that begin with double slash but aren't valid hostnames. Because the file URI spec requires us to start with "file://" anyway, we can represent those with four slashes. Note that on Unix "//X/y" is a valid but local file path. If given to QUrl::fromLocalFile(), if the path at the root does parse as a hostname, we will still try to normalize (the above becomes "file://x/y"). [ChangeLog][QtCore][QUrl] Changed QUrl::fromLocalFile() to accept Windows UNC paths whose hostname component is not a valid Internet hostname. This makes QUrl able to accept extended-length paths (\\?\), device namespace (\\.\), WSL (\\wsl$), etc. Pick-to: 5.15 Fixes: QTBUG-86277 Change-Id: I3eb349b832c14610895efffd1635759348214a3b Reviewed-by: David Faure <david.faure@kdab.com>
* tst_QUrl/Win: test QUrl::fromLocalFile with backslashesThiago Macieira2020-10-051-6/+17
| | | | | | Pick-to: 5.15 Change-Id: I3eb349b832c14610895efffd1635752ccc82889a Reviewed-by: David Faure <david.faure@kdab.com>
* tst_QUrl: give the to/fromLocalFile test rows proper namesThiago Macieira2020-10-051-52/+60
| | | | | | | | No change in testing, juts changed names and order. Pick-to: 5.15 Change-Id: I3eb349b832c14610895efffd16357498454bcd52 Reviewed-by: David Faure <david.faure@kdab.com>
* QUrl: purge deprecated APIEdward Welbourne2020-07-201-2/+0
| | | | | | | | Since 5.0: QUrl's image of the QUrlQuery API Remove deprecation-suppression from tst_qurl.cpp, too. Change-Id: Ide826283cb4e177fb34fb4080502f5a4620bd5d7 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* Use QList instead of QVector in corelib testsJarek Kobus2020-07-071-1/+1
| | | | | | Task-number: QTBUG-84469 Change-Id: Ic80fde5517aed363f17d0da55cadcc958c3c8895 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Fix QUrl::toDisplayString(PreferLocalFile) returning an encoded pathDavid Faure2020-06-291-0/+28
| | | | | | | | | | | | | It's supposed to return the same as toLocalFile(), for local files, which means passing QUrl::FullyDecoded just like QUrl::toLocalFile() does. But a few code paths were testing component formatting options without masking other FormattingOptions like RemovePassword, so this had to be fixed. Fixes: QTBUG-84594 Change-Id: I82f15148b6d93516200f9ad6258d474e7f10924a Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Remove winrtOliver Wolff2020-06-061-2/+0
| | | | | | | | | Macros and the await helper function from qfunctions_winrt(_p).h are needed in other Qt modules which use UWP APIs on desktop windows. Task-number: QTBUG-84434 Change-Id: Ice09c11436ad151c17bdccd2c7defadd08c13925 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Get rid of some QTextCodec leftoversLars Knoll2020-05-141-1/+0
| | | | | | | There's no real dependency to QTextCodec in those files anymore. Change-Id: Ifaf19ab554fd108fa26095db4e2bd4a3e9ea427f Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QtConcurrent::run: accept more then five function's argumentsVitaly Fanaskov2020-03-111-1/+1
| | | | | | | | | | | | | | [ChangeLog][Potentially Source-Incompatible Changes] QtConcurrent::run has the following signatures: run(Function &&f, Args &&...args) and run(QThreadPool *pool, Function &&f, Args &&...args). If f is a member pointer, the first argument of args should be an object for which that member is defined (or a reference, or a pointer to it). See the documentation for more details. Fixes: QTBUG-82383 Change-Id: I18f7fcfb2adbdd9f75b29c346bd3516304e32d31 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
* Remove QUrl::topLevelDomainTimur Pocheptsov2020-02-201-57/+0
| | | | | | | | | | And move the actual implementation from corelib/io to network/kernel sub-module. Fixes: QTBUG-80308 Change-Id: I554b05bae3552c68e1e1a405c169366ee19120b2 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* Fix mis-handling of actual TLD in qIsEffectiveTLD()Edward Welbourne2019-09-161-0/+7
| | | | | | | | | | | | | | | If the domain passed down is an actual TLD that's the subject of a * rule, e.g. "ck" subject to *.ck, then we were finding no dot in it and concluding that it couldn't be the subject of a * rule. Added a test for the specific .ck case and commented on where we could get some canonical test data that I tripped over while researching this. Cross-reference the cookie-jar test from the QUrl test, too. Fixes: QTBUG-78097 Change-Id: Id858a9dae22e6b306a68df3fc199e0160f537159 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Brush up tst_QUrlFriedemann Kleint2019-06-111-7/+8
| | | | | | | | | | Fix clang-tidy warnings: - Use range-based for and streamline some code - Use nullptr Change-Id: Iad43490d0e968baa76d54d3bf81558a48b19cdbd Reviewed-by: Kari Oikarinen <kari.oikarinen@qt.io>
* Fix deprecation warnings in tst_QUrlFriedemann Kleint2019-05-291-71/+58
| | | | | | | | | | | | | | | | | Change-Id: I8b1877c57d0bd061908d83c0feacfb4a4d4c3868 Reviewed-by: David Faure <david.faure@kdab.com>
* Merge remote-tracking branch 'origin/5.12' into 5.13Qt Forward Merge Bot2019-04-101-0/+8
|\ | | | | | | Change-Id: I44eda44bf424fdcffab048a2534905d6162e5559
| * tst_QUrl: Fix left-over temporary directory on WindowsFriedemann Kleint2019-04-081-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The test changes the current directory to the test directory in fromUserInputWithCwd(), but did not restore it, causing: Totals 898 passed, 0 failed, 1 skipped, 0 blacklisted, 368ms ********* Finished testing of tst_QUrl ********* QTemporaryDir Unable to remove "C:\\TEMP\\tst_qurl-ryVxqu" most likely due to the presence of read-only files. Restore the old directory at the end to fix this. Change-Id: I62669868f3c6d97dd38ebac76515428c14b7e1e7 Reviewed-by: David Faure <david.faure@kdab.com>
* | Update the DNS public suffix list from publicsuffix.orgEdward Welbourne2019-02-271-0/+15
|/ | | | | | | | | | | | | | | | Regular update in preparation for 5.13, adding tests for additions since 5.9.4/5.10.1/5.11.0's update 7e946030 (the last to record its upstream version sha1). Corrected the license header: it's now published under MPL 2.0 (not 1.1); and our secondary licensing of it is as LGPL3. Deferred full header over-haul until we've worked one out in detail. [ChangeLog][Third-Party Code] Updated DNS public suffix list Task-number: QTBUG-72623 Change-Id: Iabdbbbfd79624830396c2a6fe0a73389bd6ce5b7 Reviewed-by: Kai Koehne <kai.koehne@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* Make url normalization closer to common browser behaviorJoni Poikelin2018-12-131-2/+34
| | | | | | | | | | | | | Firefox, Chrome and various http libraries normalize /./ and /../ from urls, but retain multiple adjacent slashes as is. Qt removes duplicated slashes which makes it impossible to access some web resources that rely on those. Fixes: QTBUG-71973 Change-Id: Ie18ae6ad3264acb252fcd87a754726a8c546e5ec Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Merge remote-tracking branch 'origin/5.11' into 5.12Qt Forward Merge Bot2018-09-301-0/+12
|\ | | | | | | Change-Id: Iaa438d14357be1bf75bb645cb8d3245947c055b8
| * Fix QUrl::matches for when removing authority parts (other than host)Thiago Macieira2018-09-291-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QUrl::RemoveAuthority is RemoveUserInfo | RemovePort | 0x10, so the condition if (options & QUrl::RemoveAuthority) would match if any of the other bits for the username, password or port were set, which meant we would skip the host comparison. Ditto for username and RemovePassword. [ChangeLog][QtCore][QUrl] Fixed a bug that caused QUrl::matches to incorrectly compare two URLs with different hostnames or different usernames as equal, if certain QUrl::RemoveXxx options were passed. Change-Id: I015970a03b874898bba7fffd155856ab9d6cb1be Fixes: QTBUG-70774 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* | Merge remote-tracking branch 'origin/5.11' into devQt Forward Merge Bot2018-08-171-1/+18
|\| | | | | | | Change-Id: I8bb8227f9da982e7d5ebe5324fc27abd9ac0d4fc
| * QUrl: Make sure we do reject URLs for which IDNA nameprep failedThiago Macieira2018-08-161-1/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | qt_nameprep() already reset the string to its original length to indicate failure, but we didn't handle that in qt_ACE_do(). So make it have a return value whcih makes it easier to handle that case and do handle it. [ChangeLog][QtCore][QUrl] Fixed a bug that caused URLs whose hostnames contained unassigned or prohibited Unicode codepoints to report isValid() = true, despite clearing the hostname. Change-Id: I41e7b3bced5944239f41fffd1545b7274c4b419d Reviewed-by: David Faure <david.faure@kdab.com>
* | QUrl: Support IPv6 addresses with zone idRobbert Proost2018-07-271-0/+52
|/ | | | | | Task-number: QTBUG-25550 Change-Id: I37ec02b655abe2779aa11945e20550ce00e43723 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Merge remote-tracking branch 'origin/5.9' into 5.10Liang Qi2017-10-301-0/+35
|\ | | | | | | | | | | | | | | Conflicts: src/plugins/platforms/windows/qwindowswindow.cpp tests/auto/widgets/kernel/qaction/tst_qaction.cpp Change-Id: Ia017a825ed2ca2d53ac586f4ae48df6f65818d40
| * QUrl: make sure setPort(nonnegative) is taken as part of authorityThiago Macieira2017-10-261-0/+35
| | | | | | | | | | | | | | | | | | | | | | There were a couple of corner cases where doing setPort() would result in QUrl thinking that an authority was not present. Since the full URL parsing implies that a host is always present if the authority is present, then we also imply that setting the port number makes the host be present too. Change-Id: I69f37f9304f24709a823fffd14e67c12da18d69f Reviewed-by: David Faure <david.faure@kdab.com>
* | Merge remote-tracking branch 'origin/5.9' into 5.10Liang Qi2017-10-161-3/+14
|\| | | | | | | Change-Id: I3cf73c53cf131d0babfb558c2507bed0e0fc5f08
| * QUrl: re-fix the setPath("//path") case leading to scheme://pathThiago Macieira2017-10-061-3/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Commits aba336c2b4ad8926dc8a000718bbb7f8a6d5a72d (in Qt 5.2) and aba336c2b4ad8926dc8a000718bbb7f8a6d5a72d (in 5.6) both tried to deal with this problem, with different levels of success. This is the third attempt (and hopefully the charm). Instead of modifying the path that the user provides, go straight ahead and declare it invalid. This is supported by RFC 3986, which declares this expansion impossible: relative-part = "//" authority path-abempty / path-absolute / path-noscheme / path-empty path-abempty = *( "/" segment ) path-absolute = "/" [ segment-nz *( "/" segment ) ] path-noscheme = segment-nz-nc *( "/" segment ) The "path-abempty" and "path-noscheme" cases are the two issues we already handle. This commit adds the third one: path-absolute, which requires that the first segment of the path be of non-zero length. That is, it is now possible again to have http://example.com//path constructed piece-wise, without it producing http://example.com/path. Additionally, it catches the case of http://example.com//path parsed from full URL then followed by setAuthority(""). Change-Id: I69f37f9304f24709a823fffd14e67a5e7212ddcd Reviewed-by: David Faure <david.faure@kdab.com>
* | Merge remote-tracking branch 'origin/5.9' into devLiang Qi2017-07-041-5/+1
|\| | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/io/qprocess_unix.cpp src/plugins/platforms/xcb/qxcbconnection.cpp src/plugins/platforms/xcb/qxcbwindow.cpp src/widgets/util/util.pri tests/auto/corelib/thread/qthread/qthread.pro tests/auto/corelib/thread/qthread/tst_qthread.cpp Change-Id: I5c45ab54d46d3c75a5c6c116777ebf5bc47a871b
| * winrt: Fix tst_qurlOliver Wolff2017-06-191-5/+1
| | | | | | | | | | Change-Id: Ia7e33e3892f888ead1357f5cd522480f514421e3 Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
* | Merge remote-tracking branch 'origin/5.9' into devLiang Qi2017-03-281-1/+5
|\| | | | | | | | | | | | | | | | | Conflicts: examples/examples.pro tests/auto/corelib/tools/qchar/tst_qchar.cpp tests/auto/other/qaccessibility/accessiblewidgets.h Change-Id: I426696c40ab57d14dc295b8103152cede79f244c
| * tst_qurl: skip test with ':' in filename, on WindowsDavid Faure2017-03-211-1/+5
| | | | | | | | | | | | | | Task-number: QTBUG-59622 Change-Id: Ib4b458b5d0fc2dd9ea6758b8517a953f6d768a39 Reviewed-by: Liang Qi <liang.qi@qt.io> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
| * QUrl::fromUserInput: fix handling of files with a ':' in the nameDavid Faure2017-03-201-1/+1
| | | | | | | | | | | | | | | | | | 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>
* | Merge remote-tracking branch 'origin/5.9' into devLiang Qi2017-03-021-28/+46
|\| | | | | | | Change-Id: I84097f8e7b3b2128028bd7693c913d6968b82bfe
| * QUrl::fromUserInput(with cwd) fix handling of files with trailing spacesDavid Faure2017-02-231-1/+1
| | | | | | | | | | | | | | | | | | | | 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>