summaryrefslogtreecommitdiffstats
path: root/src/corelib/io/qurlquery.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Merge remote-tracking branch 'origin/5.13' into devQt Forward Merge Bot2019-07-101-1/+1
|\ | | | | | | | | | | | | | | Conflicts: src/corelib/time/qdatetime.cpp src/widgets/widgets/qcombobox.h Change-Id: Ib84352e8fe34aed2986a1c94e7346a46a71c803b
| * doc: Add missing class qualifierMartin Smith2019-07-091-1/+1
| | | | | | | | | | | | | | | | | | A glass qualifier was missing in a \fn command. This caused clang to report an error. The class qualifier is added by this ubdate. Change-Id: I1c4928183f4c8eb1b28f0fde2ce659a1feb24175 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* | Be less laissez-faire with implicit conversions to QCharMarc Mutz2019-07-091-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | QChar currently is convertible from nearly every integral type. This is bad code hygiene and should be fixed come Qt 6. The present patch is the result of compile fixes from marking these constructors explicit. As is clear from the distribution of fixes, only low-level string handling code used these implicit conversions, an indication that they're not in widespread use elsewhere. Change-Id: Ief5336f21e6d181e03ab92893b3d13a14adc7cb0 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* | Port from QAtomic::load() to loadRelaxed()Giuseppe D'Angelo2019-06-201-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Semi-automated, just needed ~20 manual fixes: $ find \( -iname \*.cpp -or -iname \*.h \) -exec perl -pe 's/(\.|->)load\(\)/$1loadRelaxed\(\)/g' -i \{\} + $ find \( -iname \*.cpp -or -iname \*.h \) -exec perl -pe 's/(\.|->)store\(/$1storeRelaxed\(/g' -i \{\} + It can be easily improved (e.g. for store check that there are no commas after the opening parens). The most common offender is QLibrary::load, and some code using std::atomic directly. Change-Id: I07c38a3c8ed32c924ef4999e85c7e45cf48f0f6c Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* | Move away from using 0 as a pointer constantAllan Sandfeld Jensen2019-06-071-5/+5
| | | | | | | | | | | | | | | | | | Cleans up most of corelib to use nullptr or default enums where appropriate. Change-Id: Ifcaac14ecdaaee730f87f10941db3ce407d71ef9 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Replace Q_DECL_NOEXCEPT with noexcept in corelibAllan Sandfeld Jensen2019-04-031-1/+1
|/ | | | | | | In preparation of Qt6 move away from pre-C++11 macros. Change-Id: I44126693c20c18eca5620caab4f7e746218e0ce3 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QUrlQuery: Implement initializer list constructorSamuel Gaist2018-12-091-0/+8
| | | | | | | | | | [ChangeLog][QtCore][QUrlQuery] QUrlQuery now provides an initializer list constructor. It can be created using a list of key/value pairs. Fixes: QTBUG-68645 Change-Id: Ief5939aa477718f6dd3580f2c60f95ff3aa892ae Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Doc: Move literal code block to a separate fileCristian Maureira-Fredes2018-10-151-8/+2
| | | | | | | | | | | We need to override this snippet for the documentation we generate for Qt for Python, and it is easier to have it on a separate file. Task-number: PYSIDE-801 Task-number: PYSIDE-691 Change-Id: Ideb5b6af25024279f167137d3b65660bb9c96a7e Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* QUrlQuery: use erase and std::remove_if with QListAnton Kudryavtsev2016-05-041-8/+8
| | | | | | | ... instead of using erase() in a loop, with quadratic complexity. Change-Id: I277ff2527e0a22b3d754b1d14296b9882f164c23 Reviewed-by: Marc Mutz <marc.mutz@kdab.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-13/+19
| | | | | | | | | | | 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>
* QUrlQuery: remove misleading commentMarc Mutz2016-01-041-1/+0
| | | | | | | The 'itemList' is a QList and is not maintained in sorted order. Change-Id: I8f221281803ff0e9caa054007bee3058214f2f30 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QUrlQuery: fix a very expensive always-true checkMarc Mutz2015-12-301-1/+1
| | | | | | | | | | | | | In a non-const function, if (d), d being a QSharedDataPointer, will resolve to if(d.data()), which detaches and returns a pointer to an unshared copy of the data. Thus, the test if (d) is always true. Fix by explicit use of constData(), as in other QUrlQuery functions. Change-Id: Ib926abdcdb069d69e34c3202c4cf451b7fc6a329 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* core: Add several QList::reserve() calls.Sérgio Martins2015-06-111-0/+1
| | | | | | | Reduces reallocations. Change-Id: Ib63539fb690a80245d8fe81ff8468e79ffa8e57c Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* Add qHash(QUrlQuery)Marc Mutz2015-04-201-0/+21
| | | | | | | | | QUrlQueries can be compared for equality, so qHash should be overloaded, too. [ChangeLog][QtCore][QUrlQuery] Added qHash(QUrlQuery). Change-Id: I626258a938359b49a0cae02012b6cba5ef1fe784 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Merge remote-tracking branch 'origin/5.4' into 5.5Frederik Gladhorn2015-02-241-1/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: examples/xml/htmlinfo/simpleexample.html examples/xml/rsslisting/rsslisting.cpp qmake/generators/win32/msbuild_objectmodel.cpp src/3rdparty/harfbuzz-ng/src/hb-private.hh src/corelib/global/qlogging.cpp src/corelib/io/qstorageinfo_unix.cpp src/corelib/thread/qwaitcondition_unix.cpp src/gui/kernel/qguiapplication.cpp src/plugins/platforms/linuxfb/qlinuxfbintegration.cpp src/testlib/doc/src/qt-webpages.qdoc tests/auto/other/qaccessibility/tst_qaccessibility.cpp Change-Id: Ib272ff0bc30a1a5d51275eb3cd2f201dc82c11ff
| * Doc: corrected link/autolink issues in corelibNico Vertriest2015-02-241-1/+1
| | | | | | | | | | | | Task-number: QTBUG-43115 Change-Id: I31da92e3a7c4dd7b75ee283dbfecd77e284978ca Reviewed-by: Martin Smith <martin.smith@digia.com>
* | Update copyright headersJani Heikkinen2015-02-111-6/+6
|/ | | | | | | | | | | | | | | | | | 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>
* Update license headers and add new license filesMatti Paaso2014-09-241-18/+10
| | | | | | | | | - Renamed LICENSE.LGPL to LICENSE.LGPLv21 - Added LICENSE.LGPLv3 - Removed LICENSE.GPL Change-Id: Iec3406e3eb3f133be549092015cefe33d259a3f2 Reviewed-by: Iikka Eklund <iikka.eklund@digia.com>
* Doc: Adding mark-up to boolean default values.Jerome Pasion2013-10-081-4/+4
| | | | | | | | | | | | | | | | | Default values should have mark-up to denote that they are code. This commit changes: -"property is true" to "property is \c true". -"Returns true" to "Returns \c true". -"property is false" to "property is \c false". -"returns true" to "returns \c true". -"returns false" to "returns \c false". src/3rdparty and non-documentation instances were ignored. Task-number: QTBUG-33360 Change-Id: Ie87eaa57af947caa1230602b61c5c46292a4cf4e Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com> Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
* Doc: Add docs for rvalue references and move constructorsGeir Vattekar2013-09-271-0/+8
| | | | | | | | | These members were introduced in 4.8, but left undocumented. Because we consider undocumented API to be internal, the members are \since 5.2. Change-Id: I52e2840a8cfaa7f59f410b3e2a06c0942ea06539 Reviewed-by: Jerome Pasion <jerome.pasion@digia.com> Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* Doc: update the QUrl and QUrlQuery documentationThiago Macieira2013-08-041-1/+15
| | | | | | | | Just minor fixes and changes in wording, to support the new understanding of the percent-encoded characters. Change-Id: I77ec10e41f32292d705e4aa8197b9ddce5bef6d2 Reviewed-by: David Faure (KDE) <faure@kde.org>
* QUrlQuery: update our understanding of delimitersThiago Macieira2013-08-041-19/+22
| | | | | | | | | | | | This commit is similar to the previous commit that changed the behavior of QUrl, but now to QUrlQuery. We can now remove a section of qt_urlDecode, which is no longer used: there's no "decode everything" mode anymore. Task-number: QTBUG-31660 Change-Id: I66cfbfd290eeba5b04688cd5ffd615dd57cc6309 Reviewed-by: David Faure (KDE) <faure@kde.org>
* Doc: Add the missing \since 5.0Debao Zhang2013-02-251-0/+1
| | | | | | Change-Id: I79f67e18b64efe7d22ed80adbc6f024ef35b3aac Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* Change copyrights from Nokia to DigiaIikka Eklund2012-09-221-23/+23
| | | | | | | | Change copyrights and license headers from Nokia to Digia Change-Id: If1cc974286d29fd01ec6c19dd4719a67f4c3f00e Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
* Doc: Add \inmodule QtCore to all QtCore class doc bodiesThiago Macieira2012-08-231-0/+1
| | | | | Change-Id: I19100755c97cc155c76a859e19940e9f9222d34e Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
* Fix QUrlQuery qdoc errorsJeremy Katz2012-07-271-5/+28
| | | | | | | | | Add missing documentation for toString() and operator!= Mark data_ptr() and associated typedef internal and some qdoc tag usage issues Change-Id: I0ad5a2c767fb742d9a86ae259c0c11a0f5db64b4 Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
* Fix some spelling errorsSergio Ahumada2012-07-111-1/+1
| | | | | | Change-Id: I19d3b2e9a5180b13deb828b55195404ef20be295 Reviewed-by: Daniel Teske <daniel.teske@nokia.com> Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
* QtCore: add member-swap to shared classesMarc Mutz2012-07-031-0/+7
| | | | | | | | | | Implemented as in other shared classes (e.g. QPen). Special case: QUrlQuery: document existing swap(). Change-Id: I4b36cc9577fbf2232d4b2a2d8822d26e41e22cad Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Port away from QUrl::MostDecodedThiago Macieira2012-05-221-3/+3
| | | | | | | | | | | Since we're about to introduce QUrl::FullyDecoded, this QUrl::MostDecoded value would be confusing. Replace its uses with what was intended at the point in question. Change-Id: Iefd87bc33d37bace507c5cb0f206fa902e08e2df Reviewed-by: Lars Knoll <lars.knoll@nokia.com> Reviewed-by: David Faure <faure@kde.org> Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
* Doc: Move some remaining files over for modularization.Casper van Donderen2012-05-091-1/+1
| | | | | | | | | The files in this change were still in qtbase/doc/src or required for it. qtbase/doc/src should now only contain example documentation and images for the example documentation. Change-Id: Ia7ca8e7fd2b316e77c706a08df71303bc8294213 Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
* Add some missing includes.Stephen Kelly2012-05-031-0/+2
| | | | | | | | There is a #include <QStringList> line wrapped in QT_DEPRECATED_SINCE(5, 0). Change-Id: I766848dfcc3bd765c57626a3d70f492ac1219091 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Change the component formatting enum values so the default is zeroThiago Macieira2012-04-111-5/+2
| | | | | | | | | | | | | | | | | | | | | | By having the default value equal to zero, we follow the principle of least surprise. For example, if we had url.path() and we refactored to url.path(QUrl::DecodeSpaces) Then instead of ensuring spaces are decoded, we make spaces the only thing encoded (unicode, delimiters and reserved characters are encoded). Besides, modifying the default can only be used to encode something that wasn't encoded previously, so having the enums as Encode makes more sense. As a side-effect, toEncoded() does not support any extra encoding options. Change-Id: I2624ec446e65c2d979e9ca2f81bd3db22b00bb13 Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
* Merge QUrl::DecodeAllDelimiters and QUrl::DecodeUnambiguousDelimitersThiago Macieira2012-04-111-11/+7
| | | | | | | | | | | | | | | | | | | There's little value in having the DecodeUnambiguousDelimiters option since neither QUrl nor QUrlQuery can return values that are ambiguous in that particular context, ever. This option could be used to encode a character if, when placed in a URL, it would need to be encoded. Such cases are hash (#) or question marks (?) in the path component, or slashes (/) and at signs (@) in the userinfo. However, we don't need two enums for that, since there are no other characters that can appear in either form. Still, leave two bits for this enum. In the future, if we want to split the gen-delims from the sub-delims, we are able to. Change-Id: If5416b524680eb67dd4abbe7d072ca0ef7218506 Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
* Fix the handling of ambiguous delimiters in the query part of a URLThiago Macieira2012-04-111-18/+11
| | | | | | | | | | | This is the same fix as the previous commit did for the other components of the URL. But we're also changing how we handle the "[]" characters in a query: previously the handling was like for other sub-delims; now, they're always decoded, assuming that the RFC had a mistake and they were meant to be decoded. Change-Id: If4b1c3df8f341cb114f2cc4860de22f8bf0be743 Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
* Fix the license headers for the files in the new-qurl branchThiago Macieira2012-03-301-1/+1
| | | | | Change-Id: I469fed8b72111905e31553d0c82e62ced4009d75 Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
* Port to the new QUrl APIThiago Macieira2012-03-301-1/+1
| | | | | | | | | | | | | | The use of any broken-down components of the query now needs QUrlQuery. The QUrl constructor and toString() are now rehabilitated and the preferred forms. Use toEncoded() and fromEncoded() now only when we need to store data in a QByteArray or the data comes from a QByteArray anyway. Change to toString() or the constructor if the data was in a QString. Change-Id: I9d761a628bef9c70185a48e927a61779a1642342 Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Move some of qurl.cpp into other files for ease of maintenanceThiago Macieira2012-03-301-3/+1
| | | | | | | | The parsing code is now in qurlparser.cpp, whereas the IDNA related code is in qurlidna.cpp. Change-Id: I0b32c0bf0ee6c2f08dc3200c44af3c9d1504a3df Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Long live QUrlQueryThiago Macieira2012-03-301-0/+745
This class is meant to replace the QUrl functionality that handled key-value pairs in the query part of an URL. We therefore split the URL parsing code from the code dealing with the pairs: QUrl now only needs to deal with one encoded string, without knowing what it is. Since it doesn't know how to decode the query, QUrl also becomes limited in what it can decode. Following the letter of the RFC, queries will not encode "gen-delims" nor "sub-delims" nor the plus sign (+), thus allowing the most common delimiters options to remain unchanged. QUrlQuery has some undefined behaviour when it comes to empty query keys. It may drop them or keep them; it may merge them, etc. Change-Id: Ia61096fe5060b486196ffb8532e7494eff58fec1 Reviewed-by: Lars Knoll <lars.knoll@nokia.com>