summaryrefslogtreecommitdiffstats
path: root/src/corelib/io/qurl.h
Commit message (Collapse)AuthorAgeFilesLines
* QUrl: Use new comparison helper macrosRym Bouabid2024-03-061-0/+8
| | | | | | | | | | | | | | | | 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>
* Remove redundant QPair includesAhmad Samir2023-09-061-1/+0
| | | | | | | | Nothing in those files uses QPair; and a local build finished fine without them. Task-number: QTBUG-115841 Change-Id: I669cfecaa9129bce6b31e464826287f138b159db Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QUrl: Add QUrl::fromEncoded(QByteArrayView) overloadAhmad Samir2023-06-081-0/+3
| | | | | | | | | | | Copy \note about backwards compatibility from QMessageAuthenticationCode (with minor changes). [ChangeLog][QtCore][QByteArray] Added QUrl::fromEncoded(QByteArrayView) overload. Change-Id: I8a190db2d50467e6191caf0abfe975b8fc656eb4 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QVariant: make many more QtCore types nothrow-copyableThiago Macieira2022-07-301-2/+2
| | | | | | | | | | | | | | | All of those are implicitly-shared Qt data types whose copy constructors can't throw and have wide contracts (there aren't even any assertions for validity in any of them). These are all types with a QVariant implicit constructor, except for QCborValue, which is updated on this list so QJsonValue (which has a QVariant constructor) is also legitimately noexcept. To ensure we haven't made a mistake, the Private constructor checks again. Change-Id: I3859764fed084846bcb0fffd17044d8319a45e1f Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Use SPDX license identifiersLucie Gérard2022-05-161-39/+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>
* QUrl: Use Q_CORE_REMOVED_SINCE instead of explicit version checksIevgenii Meshcheriakov2022-02-031-6/+3
| | | | | | | | | Use Q_CORE_REMOVED_SINCE macro for fromAce()/toAce() API changes. Pick-to: 6.3 Change-Id: I057c6d648c2141929f04e4b4c4a38ba3275261ab Reviewed-by: Marc Mutz <marc.mutz@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* QtCore: replace qSwap with std::swap/member-swap where possibleMarc Mutz2022-01-201-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | qSwap() is a monster that looks for ADL overloads of swap() and also detects the noexcept of the wrapped swap() function, so it should only be used when the argument type is unknown. In the vast majority of cases, the type is known to be efficiently std::swap()able or to have a member-swap. Call either of these. For the common case of pointer types, circumvent the expensive trait checks on std::swap() by providing a hand-rolled qt_ptr_swap() template, the advantage being that it can be unconditionally noexcept, removing all type traits instantiations. Don't document it, otherwise we'd be unable to pick it to 6.2. Effects on Clang -ftime-trace of a PCH'ed libQt6Gui.so build: before: **** Template sets that took longest to instantiate: [...] 27766 ms: qSwap<$> (9073 times, avg 3 ms) [...] 2806 ms: std::swap<$> (1229 times, avg 2 ms) (30572ms) after: **** Template sets that took longest to instantiate: [...] 5047 ms: qSwap<$> (641 times, avg 7 ms) [...] 3371 ms: std::swap<$> (1376 times, avg 2 ms) [qt_ptr_swap<$> does not appear in the top 400, so < 905ms] (< 9323ms) As a drive-by, remove superfluous inline keywords and template ornaments. Task-number: QTBUG-97601 Pick-to: 6.3 6.2 Change-Id: I88f9b4e3cbece268c4a1238b6d50e5712a1bab5a Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* corelib: Fix typos in source code commentsJonas Kvinge2021-10-121-1/+1
| | | | | | Pick-to: 6.2 Change-Id: Ic78afb67143112468c6f84677ac88f27a74b53aa Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* QUrl: Implement UTS #46Ievgenii Meshcheriakov2021-08-261-0/+15
| | | | | | | | | | | | | | | | UTS #46 (https://unicode.org/reports/tr46/) is a successor to IDNA 2003/2008 standards from Unicode. The current implementation uses nontransitional processing by default. An optional argument is added to QUrl::toAce() and QUrl::fromAce() to allow using transitional processing and to ignore the IDN whitelist. [ChangeLog][QtCore][QUrl] ACE processing is now performed according to the UTS #46 standard based on IDNA 2008 instead of IDNA 2003. Task-number: QTBUG-85371 Change-Id: I46b2e86792bc9699cb6961bae8e283fbff72f874 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* QUrl: use QFlags::toInt / qToUnderlyingGiuseppe D'Angelo2021-05-231-8/+8
| | | | | | | | | | | In preparation for blocking QFlags->int conversions. The existing casts to uint are wrong, in the general case, as the enumeration might actually be backed by signed integers; that makes them fail to compile. Port them to toInt(). For symmetry, also use qToUnderlying. Change-Id: I851544f6ba05295fa5f6c5cc355b9de0f1362e2b Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QUrlTwoFlags: add support for operator&=, |=, ^= taking QFlagsGiuseppe D'Angelo2021-05-121-0/+6
| | | | | | | | Rather than forcing an implicit conversion to int, accept a QFlags (over either one of the two enumerations) directly. Change-Id: I56af3a85982ecb66369e4a7105d07de0d6e0c40a Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QUrl: code tidiesGiuseppe D'Angelo2021-05-021-9/+9
| | | | | | | | | Change some casts of enumeration/flag types from int to uint. In fact, the enumerations (and flags) in question are *defined* to be backed by unsigned int. Change-Id: I757ded61a26fe979deeaa1e5a524478102960ffe Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Explicitly set enums' type to avoid undefined behaviorRobert Löhning2021-04-071-2/+2
| | | | | | | | | Fixes oss-fuzz issue 31022. Fixes: QTBUG-92159 Pick-to: 6.1 Change-Id: I8f0dfbe0e198f9ac43754758d18db1f0842d6eae Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Also remove 0 initialization from QUrlTwoFlagsAllan Sandfeld Jensen2020-11-271-2/+1
| | | | | | | | Was overlooked when removed from QFlags Pick-to: 6.0 6.0.0 Change-Id: If65ff4a07e2f72589d2c32c2d24366ff9dc2405f Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Centralize the implementation of move assignment operatorsGiuseppe D'Angelo2020-10-031-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | At the moment we have two main strategies for dealing with move assignment in Qt: 1) move-and-swap, used by "containers" (in the broad sense): containers, but also smart pointers and similar classes that can hold user-defined types; 2) pure swap, used by containers that hold only memory (e.g. QString, QByteArray, ...) as well as most implicitly shared datatypes. Given the fact that a move assignment operator's code is just boilerplate (whether it's move-and-swap or pure swap), provide two _strictly internal_ macros to help write them, and apply the macros across corelib and gui, porting away from the hand-rolled implementations. The rule of thumb when porting to the new macros is: * Try to stick to the existing code behavior, unless broken * if changing, then follow this checklist: * if the class does not have a move constructor => pure swap (but consider ADDING a move constructor, if possible!) * if the class does have a move constructor, try to follow the criteria above, namely: * if the class holds only memory, pure swap; * if the class may hold anything else but memory (file handles, etc.), then move and swap. Noteworthy details: * some operators planned to be removed in Qt 6 were not ported; * as drive-by, some move constructors were simplified to be using qExchange(); others were outright broken and got fixed; * some contained some more interesting code and were not touched. Change-Id: Idaab3489247dcbabb6df3fa1e5286b69e1d372e9 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Replace Q_REQUIRED_RESULT with [[nodiscard]]Allan Sandfeld Jensen2020-09-251-2/+2
| | | | | | | It was already used many places directly making the code inconsistent. Change-Id: I3b14bc6c333640fb3ba33c71eba97e78c973e44b Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Merge the two QUrl::fromUserInput overloadsDavid Faure2020-08-231-3/+1
| | | | | Change-Id: I4d4cd0961c30e898118c0a5f74bcd3234173384a Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Replace Qt CONSTEXPR defines with constexprAllan Sandfeld Jensen2020-08-141-33/+33
| | | | | | | | Both normal and relaxed constexpr are required by our new minimum of C++17. Change-Id: Ic028b88a2e7a6cb7d5925f3133b9d54859a81744 Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
* Purge redundant recoding of URL fragments from QByteArrayEdward Welbourne2020-07-271-4/+0
| | | | | | | | | | | | | QUrl::fromEncodedComponent_helper() only existed to support some old methods deprecated since 5.0, that I recently removed. It was the only caller of qt_urlRecodeByteArray() aside from that function's own autotest. Both were private. Task-number: QTBUG-85700 Change-Id: I5d09fd44e768847ce51a1ae7043150922cb5314c Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* QUrl: purge deprecated APIEdward Welbourne2020-07-201-71/+1
| | | | | | | | 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>
* Change qHash() to work with size_t instead of uintLars Knoll2020-04-091-2/+2
| | | | | | | | | | | This is required, so that QHash and QSet can hold more than 2^32 items on 64 bit platforms. The actual hashing functions for strings are still 32bit, this will be changed in a follow-up commit. Change-Id: I4372125252486075ff3a0b45ecfa818359fe103b Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* Remove QUrl::topLevelDomainTimur Pocheptsov2020-02-201-5/+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>
* QUrl::topLevelDomain() - deprecate in 5.15Timur Pocheptsov2020-02-051-1/+3
| | | | | | | | | | | And remove in Qt 6 (with private API remaining). [ChangeLog][Deprecation Notice] QUrl::topLevelDomain() was deprecated in 5.15 and will be removed in 6.0 Task-number: QTBUG-80308 Change-Id: Ie053c9c8813274c971e2d6fc442dd6ce716fadf1 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* Remove handling of missing Q_COMPILER_RVALUE_REFSAllan Sandfeld Jensen2019-04-081-2/+0
| | | | | Change-Id: I7bc6c455fbae4cdad584c76773299a6d8cd40c82 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Replace Q_DECL_NOEXCEPT with noexcept in corelibAllan Sandfeld Jensen2019-04-031-5/+5
| | | | | | | In preparation of Qt6 move away from pre-C++11 macros. Change-Id: I44126693c20c18eca5620caab4f7e746218e0ce3 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Replace Q_NULLPTR with nullptr where possibleKevin Funk2017-09-191-1/+1
| | | | | | | | | | | | | Remaining uses of Q_NULLPTR are in: src/corelib/global/qcompilerdetection.h (definition and documentation of Q_NULLPTR) tests/manual/qcursor/qcursorhighdpi/main.cpp (a test executable compilable both under Qt4 and Qt5) Change-Id: If6b074d91486e9b784138f4514f5c6d072acda9a Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* Move Q_REQUIRED_RESULT to its correct positionThiago Macieira2017-04-201-2/+2
| | | | | | | | | | | That's before the return type or static, inline, constexpr or such keywords (if any). Perl Script: s/^(\s+)(.*) Q_REQUIRED_RESULT(;)?(\s*\/\/.*)?$/\1Q_REQUIRED_RESULT \2\3\4/ Change-Id: I7814054a102a407d876ffffd14b6a16182f159e2 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* Remove qtypetraits.h's contents altogetherGiuseppe D'Angelo2017-01-121-2/+2
| | | | | | | | | | | | | | | | | So that QFlags can use an (un)signed int matching the underlying type as identified by the compiler and not by us. Requires fixing a few warnings about sign conversion due to QFlags misusages in qtbase that were either plain wrong, or were relying on the enum being backed by an (un)signed int when it wasn't. Keep qtypetraits.h in the source tree in order to prevent source breaks if some downstream #includes it (note however that it did not contain any public API). Change-Id: Ib3a92b98db7031e793a088fb2a3b306eff4d7a3c Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Add configure feature for QUrl::topLevelDomainLars Knoll2016-10-111-0/+2
| | | | | Change-Id: I237af8c60a9572c707e7004c9a284dd6cd3306ce Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* Properly forward-declare the Apple types with Q_QDOCOlivier Goffart2016-05-311-2/+2
| | | | | | | | | They are needed for the header to be parsed properly with clang based qdoc. While we are at it, change the condition from Q_OS_MAC to Q_OS_DARWIN Change-Id: I2a2f9c1159f47795d9811023d67c86fec1866846 Reviewed-by: Jake Petroules <jake.petroules@qt.io>
* darwin: Simplify conversion function declarations in headersTor Arne Vestbø2016-05-031-5/+1
| | | | | | | | | | | We don't need to include Q_QDOC in the forward-declarations of the native types, and Q_FORWARD_DECLARE_OBJC_CLASS works in non-Objective-C mode as well, which means we can declare the Objective-C versions of the functions without guards. Change-Id: I32089c496b4f7ce47f0388ba3f65e0b091d1e9ee Reviewed-by: Martin Smith <martin.smith@theqtcompany.com> Reviewed-by: Jake Petroules <jake.petroules@qt.io>
* QUrl documentation: fix clang parsingOlivier Goffart2016-04-111-0/+8
| | | | | | | | | | QUrl::FormattingOptions need to be declared with Q_DECLARE_FLAGS for documentation purposes. But it's actually a QUrlTwoFlags and need to be so in order to get the default arguments parsed without errors. So hack it by introducing a fake internal QFlags specific to QUrl Change-Id: I851aca2ab3fd4c10d9cb2dc4d6a0f236813d20ad Reviewed-by: Martin Smith <martin.smith@theqtcompany.com>
* Forward declare the Objective C types for the documentation.Olivier Goffart2016-03-181-2/+2
| | | | | | | Required for clang doc parsing. Change-Id: Ia00717377e9524efae1266d1a01b2ef0e064b11e Reviewed-by: Morten Johan Sørvig <morten.sorvig@theqtcompany.com>
* Updated license headersJani Heikkinen2016-01-211-1/+1
| | | | | | | | | | | | | From Qt 5.7 -> tools & applications are lisenced under GPL v3 with some exceptions, see http://blog.qt.io/blog/2016/01/13/new-agreement-with-the-kde-free-qt-foundation/ Updated license headers to use new GPL-EXCEPT header instead of LGPL21 one (in those files which will be under GPL 3 with exceptions) Change-Id: I42a473ddc97101492a60b9287d90979d9eb35ae1 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* Updated license headersJani Heikkinen2016-01-151-14/+20
| | | | | | | | | | | From Qt 5.7 -> LGPL v2.1 isn't an option anymore, see http://blog.qt.io/blog/2016/01/13/new-agreement-with-the-kde-free-qt-foundation/ Updated license headers to use new LGPL header instead of LGPL21 one (in those files which will be under LGPL v3) Change-Id: I046ec3e47b1876cd7b4b0353a576b352e3a946d9 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* Add Q_REQUIRED_RESULT in several placesSérgio Martins2015-05-041-2/+2
| | | | | | Change-Id: Icda3000f1d9f0d41612a50a816aa5de5e32028d4 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* Update copyright headersJani Heikkinen2015-02-111-7/+7
| | | | | | | | | | | | | | | | | | Qt copyrights are now in The Qt Company, so we could update the source code headers accordingly. In the same go we should also fix the links to point to qt.io. Outdated header.LGPL removed (use header.LGPL21 instead) Old header.LGPL3 renamed to header.LGPL3-COMM to match actual licensing combination. New header.LGPL-COMM taken in the use file which were using old header.LGPL3 (src/plugins/platforms/android/extract.cpp) Added new header.LGPL3 containing Commercial + LGPLv3 + GPLv2 license combination Change-Id: I6f49b819a8a20cc4f88b794a8f6726d975e8ffbe Reviewed-by: Matti Paaso <matti.paaso@theqtcompany.com>
* QtCore: mark some operations nothrowMarc Mutz2015-01-101-4/+4
| | | | | | | | | | | | This shotgun-surgery approach is motivated by trying to get a clean(er) build for -Wnoexcept on GCC, so it is expected that for any class touched here, there will be more operations that can be marked nothrow. But they don't show up in conditional noexcept clauses, yet, so they are deferred to some later commit. Change-Id: I0eb10d75a26c361fb22cf785399e83b434bdf233 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Update license headers and add new license filesMatti Paaso2014-09-241-19/+11
| | | | | | | | | - Renamed LICENSE.LGPL to LICENSE.LGPLv21 - Added LICENSE.LGPLv3 - Removed LICENSE.GPL Change-Id: Iec3406e3eb3f133be549092015cefe33d259a3f2 Reviewed-by: Iikka Eklund <iikka.eklund@digia.com>
* Add QUrl::fromUserInput overload with a cwd argument.David Faure2014-05-061-0/+9
| | | | | | | | Useful for any application that can take URLs on the command-line, so that full paths and relative paths can also be accepted. Change-Id: I8a2c50f36d60bdc49c065b3065972fd5d45fa12a Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QUrlTwoFlag: add two missing constexprMarc Mutz2013-11-071-2/+2
| | | | | | | | | The other member functions that can be constexpr already are, only these were missing. Change-Id: I717c74b210b45cfb8af9168d61e27e3ff2f6a9c9 Reviewed-by: Olivier Goffart <ogoffart@woboq.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Q(UrlTwo)Flags: avoid undefined behaviorMarc Mutz2013-11-071-13/+13
| | | | | | | | | | | | | | Loading an enum with a value that isn't in the enum is undefined, according to Clang's usan. So when doing logical operations on QFlags<E>, don't go through the QFlags(E) constructor, but via QFlags(QFlag) (=int) instead. Apply the same change to QUrlTwoFlags. Change-Id: I5f27e22c4d831482fcbba88b97cb124fb005e3fd Reviewed-by: Olivier Goffart <ogoffart@woboq.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Declare Cocoa conversion funcs in objc-mode only.Morten Johan Sørvig2013-11-051-1/+5
| | | | | | | | | | | | | | | | | In practice, there are several ways to forward-declare objective-c classes. Qt uses "struct objc_object", other projects may use a plain "class". Mismatched forward declarations will lead to compile errors, and this is a form of header pollution. dd5e40d9 added a workaround where Q_FORWARD_DECLARE_OBJC_CLASS can be predefined in order to sync up the declarations. Make forward declaration clashes less likely by forward-declaring in objc-mode only. Change-Id: I9f7a399d64dc88bfe05d5385b3d46b5302112aef Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
* Add Mac type conversion functions to QtCoreMorten Johan Sørvig2013-09-211-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | New API: static QString QString::fromCFString(CFStringRef string); CFStringRef QString::toCFString() const; static QString QString::fromNSString(const NSString *string); NSString *QString::toNSString() const; static QUrl QUrl::fromCFURL(CFURLRef url); CFURLRef QUrl::toCFURL() const; static QUrl QUrl::fromNSURL(const NSURL *url); NSURL * QUrl::toNSURL() const; Add Q_OS_MAC-protected function declarations to header files, add implementation to _mm files. CF and NS types are forward-declared in the header files to avoid including the CoreFoundation and Foundation headers. This prevents accidental use of native types in application code. Add helper macros for forward- declaration to qglobal.h Add cf_returns_retained/ns_returns_autoreleased attributes to toCFString() and toNSURL(). These attributes assists the clang static analyzer. Add Q_DECL_ helper macros to qcompilerdetection.h. Add test functions (in _mac.mm files) to the QString and QUrl tests. Split out the test class declarations into a separate headers files. Change-Id: I60fd5e93f042316196284c3db0595835fe8c4ad4 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
* QUrl: Use decoded mode by default for individual getters/setters.David Faure2013-08-211-10/+10
| | | | | | | | | | | | | | | | | | | This fixes the wrong value for path() and fileName() when a path or file name actually contains a '%'. userInfo() and authority() are not individual getters, they combine two or more fields, so full decoding isn't possible (e.g. username containing a ':'). [ChangeLog][Important Behavior Changes][QUrl and QUrlQuery]QUrl now defaults to decoded mode in the getters and setters for userName, password, host, topLevelDomain, path and fileName. This means a '%' in one of those fields is now returned (or set) as '%' rather than "%25". In the unlikely case where the former behavior was expected, pass PrettyDecoded to the getter and TolerantMode to the setter. Change-Id: Iaeecbde9c269882e79f08b29ff8c661157c41743 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QUrl: add matches(url, options) method.David Faure2013-07-261-0/+2
| | | | | Change-Id: I534f494aecc48cc2accfcfcb692f35046250b493 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QUrl: add fileName() method. Complements QUrl::RemoveFilename.David Faure2013-07-201-0/+1
| | | | | Change-Id: Ieda43364214c3b7aee43040e176e29ad48c14271 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QUrl: add NormalizePathSegments to UrlFormattingOptionsDavid Faure2013-07-131-1/+2
| | | | | | | | | This is a bit like QDir::cleanPath(), but for URL paths. The code is shared with QDir::cleanPath(), by extracting the common parts it into a helper, qt_normalizePathSegments(). Change-Id: I7133c5e4aa2bf17fba98af13eb5371afba64197a Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Merge branch 'stable' into devSergio Ahumada2013-07-111-1/+5
|\ | | | | | | | | | | | | | | | | | | Conflicts: qmake/generators/mac/pbuilder_pbx.cpp src/corelib/json/qjsonwriter.cpp src/corelib/kernel/qeventdispatcher_blackberry.cpp src/plugins/platforms/cocoa/qcocoacolordialoghelper.mm Change-Id: I24df576c4cbd18fa51b03122f71e32bb83b9028f
| * Remove default argument from declarations of qHash as friendGiuseppe D'Angelo2013-07-021-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It's illegal in C++11: §8.3.6.4 [dcl.fct.default] "If a friend declaration specifies a default argument expression, that declaration shall be a definition and shall be the only declaration of the function or function template in the translation unit." Clang is starting to enforce this, thus it's making qtbase not compiling. Task-number: QTBUG-32100 Change-Id: Ifd9d4f62354d7cf4ccf275f36aab64e05c59efff Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com> Reviewed-by: Mitch Curtis <mitch.curtis@digia.com> Reviewed-by: Olivier Goffart <ogoffart@woboq.com>