summaryrefslogtreecommitdiffstats
path: root/src/corelib/io/qurl.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Limit the range of the QUrlPrivate::port to -1 to 65535Thiago Macieira2013-01-141-1/+1
| | | | | | | | | | | | | The internal parser can read values outside this range (and cannot report an error), but QUrl::port() must not return something outside that range. The correct solution would be to report an error, like in Qt 5, but that cannot easily be done. The rewritten parser in Qt 5 is not affected by this issue. Task-number: QTBUG-28985 Change-Id: I3cf595384f14272197dcfb85943213c8f8ddeba0 Reviewed-by: David Faure (KDE) <faure@kde.org>
* QUrl::fromUserInput: fix for urls without a host.David Faure2013-01-141-2/+1
| | | | | | | | | | QUrl::fromUserInput("http://") was invalid, which doesn't make sense since QUrl("http://") is valid. Same for "smb:" which is actually even more a valid URL from a user's point of view. Change-Id: I371ac393d61b49499edf5adbbc2a90b426fe9e5d (cherry-picked from qt5 commit 8b2728ec382565c5bd57148600e34740a3c3fe52) Reviewed-by: David Faure (KDE) <faure@kde.org>
* Update copyright year in Digia's license headersSergio Ahumada2013-01-131-1/+1
| | | | | | Change-Id: I52bf8ef0447b701b4ebf7d7d240013a72adb9425 Reviewed-by: Akseli Salovaara <akseli.salovaara@digia.com> Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
* QUrl: make sure setAuthority is consistent with setHostPeter Hartmann2012-12-151-1/+4
| | | | | | | | | ... which is important for an empty but non-null authority. In Qt5 this is already working. Change-Id: I7d389037f71320c6f06897b220633311c3611eea Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QUrl: ensure toEncoded() matches toString() wrt. empty authorityPeter Hartmann2012-12-151-1/+1
| | | | | | | | | | | This was already fixed for toString() with commit 884f15e, this commit also fixes the toEncoded() implementation. In Qt5 this is already working. Task-number: QTBUG-8701 Change-Id: I0c81801e74d97de31632df45e52a25eb037b4710 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Change copyrights from Nokia to DigiaIikka Eklund2012-09-291-24/+24
| | | | | | | | Change copyrights and license headers from Nokia to Digia Change-Id: I280c0a575987d1770e354b4948f1d4d767d711ea Reviewed-by: Simo Fält <simo.falt@digia.com> Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
* QUrl: fix thread safety.David Faure2012-08-231-49/+179
| | | | | | | | | | | | | | | Developers expect const methods on the same QUrl instance to be usable from multiple threads (including copying and modifying the copy). The delayed parsing and internal cache of encoded strings break this, however (and the implicit sharing, for the case of copying). Protection with a mutex fixes this. Qt-5.0 doesn't have this issue, since QUrl doesn't do delayed parsing anymore. Change-Id: Ie2674e46eb7416b0e753323b673c10f9d3457f6d Reviewed-by: Marc Mutz <marc.mutz@kdab.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Update contact information in license headers.Sergio Ahumada2012-08-011-2/+2
| | | | | | | | | | | | | - Replace Nokia contact email address with Qt Project website. - Remove "All rights reserved" line from license headers. As in the past, to avoid rewriting various autotests that contain line-number information, an extra blank line has been inserted at the end of the license text to ensure that this commit does not change the total number of lines in the license header. Change-Id: Ie7ba62011752fcb149b99b26317c54f2a0cfa931 Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
* QUrl: document that setIdnWhitelist isn't thread-safeMarc Mutz2012-07-281-0/+3
| | | | | Change-Id: Ia77a211f1d670d81b2a4783693ed09533d53eceb Reviewed-by: David Faure <faure@kde.org>
* QUrl: add missing detach() in setEncodedUrl, spotted by Marc Mutz.David Faure2012-07-221-2/+2
| | | | | | | Reported-by: Marc Mutz <marc.mutz@kdab.com> Change-Id: If53957bafa9c077981c8ec5107313bc25469b579 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* qurl.cpp: Remove trailing whitespaces.David Faure2012-07-221-19/+19
| | | | | Change-Id: Ic075b50cff71fcc2e5dd5c14d55ef2f587cd2418 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Doc: Fix QUrl::isLocalFile documentationSergio Ahumada2012-07-211-1/+1
| | | | | | | | | | | This function was introduced in 4.7 by a2f797b52c4274a62a7cf1f0939aca1429afe211 but then reverted by 98e935eed5549e479f6666680aed1711dc42111c Task-number: QTBUG-21293 Change-Id: I6ec9c6696e5c85e44774184010eb9135ef7f3365 Reviewed-by: David Faure <faure@kde.org> Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com> (cherry picked from commit e2c27b3052fe49a19c4092759682bddf2c2a37f7)
* Fix IPv6 address returned from QUrl::hostShane Kearns2012-04-231-5/+4
| | | | | | | | | | | | When passing an IPv6 address through QNetworkProxyQuery, it is stored in a QUrl internally. There was a bug in QUrl where it strips the [] surrounding an IPv6 address only if they were present in the input, otherwise it added them. Now the behaviour is the same as Qt5 ([] are always stripped). Change-Id: I42e020ce30d18a4108f1dd4428809fed07991680 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Change QUrl::toLocalFile to return path for relative urlsAapo Haapanen2012-02-021-1/+8
| | | | | | | | | | | | | | | | | | This change reverts the behaviour of QUrl::toLocalFile to the state it was before 4.8. After this change the function returns the path if the url is relative. Before this change an empty QString was returned. A relative url can refer to a local file, but that can't be determined from the url alone. Thus, it makes sense to return the path for such urls. Added documentation to explain that the function works like this to maintain backward compatability in 4.x, but the handling of relative URLs will change in 5.0. Task-number: QTBUG-19827 Change-Id: I8bb8f4603a5936c0359afc1b6ff98824fad6cbc9 Reviewed-by: Olivier Goffart <ogoffart@woboq.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Various qt documentation fixes (wk 43)artoka2012-01-311-0/+2
| | | | | | | | | | | | | | | | | | | | | Task-number: QTBUG-12389 Task-number: QTBUG-16667 Task-number: QTBUG-6151 Task-number: QTBUG-8625 Task-number: QTBUG-19808 Task-number: QTBUG-12096 Task-number: QTBUG-1231 Task-number: QTBUG-21073 Task-number: QTBUG-8939 Task-number: QTBUG-20399 Task-number: QTBUG-20944 Task-number: QTBUG-7542 Task-number: QTBUG-22095 Task-number: QTBUG-11278 Task-number: QTBUG-15653 Change-Id: Ibc369998d06e7f2f11b01a1ba4c2fb927e3c065b Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
* Update year in Nokia copyright messages.Jason McDonald2012-01-111-1/+1
| | | | | | | | | Simple search and replace. This commit doesn't touch 3rd-party files, nor translations (where the change is not so simple and will be handled in a separate commit). Change-Id: I4e48513b8078a44a8cd272326685b25338890148 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Doc: Fixed the example of an encoded URL in the class description.David Boddie2011-07-211-2/+3
| | | | | Task-number: QTBUG-20398 (cherry picked from commit 88b4736d8085db27abbe54ac6ece86f9badf154a)
* Doc: Moved general notes about character conversion.David Boddie2011-07-181-10/+13
| | | | Task-number: QTBUG-20411
* Fix invalid read in QUrl::removeAllEncodedQueryItemsOlivier Goffart2011-06-281-0/+1
| | | | | | | | | | | | | | | | | | | The remove will detach the string making the query pointer invalid. Note: the "test3" case is commented out because it does not remove the & at the end, and i do not want to enforce this behaviour in the test Task-number: QTBUG-20065 Change-Id: I195c5c3b468f46c797c7c4f8075303f2b1f4724c Reviewed-on: http://codereview.qt.nokia.com/822 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Peter Hartmann <peter.hartmann@nokia.com> (cherry picked from commit 2dd90a27a82289a5088b929c3bd27c1fd05967f6) Conflicts: tests/auto/qurl/tst_qurl.cpp
* Merge branch '4.8' of scm.dev.nokia.troll.no:qt/qtDavid Boddie2011-06-171-1/+18
|\ | | | | | | | | | | | | Conflicts: doc/src/declarative/righttoleft.qdoc examples/draganddrop/fridgemagnets/main.cpp examples/script/context2d/main.cpp
| * Merge remote-tracking branch 'origin/4.8'Olivier Goffart2011-05-241-17/+17
| |\
| * | Add QUrl::topLevelDomain() and move TLD table from QtNetwork to QtCoreRobert Hogan2011-05-241-1/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Move Qt's copy of the Mozilla public suffix list from QtNetwork to QtCore and use it to expose a new API function QUrl::topLevelDomain(). This function returns the section of the url that is a registrar-controlled top level domain. QtCore now exports a couple of functions to the other Qt modules: qTopLevelDomain, a helper function for QUrl::topLevelDomain(); and qIsEffectiveTLD(), a helper function for QNetworkCookeieJar. The motivation for this new API is to allow QtWebKit implement a Third-Party Cookie blocking policy. For this QtWebKit needs to know the element of the url that is the registry-controlled TLD. Without this knowledge it would end up blocking third-party cookies per host rather than per registry-controlled domain. See also https://bugs.webkit.org/show_bug.cgi?id=45455 Merge-request: 1205 Task-number: QTBUG-13601 Reviewed-by: Peter Hartmann <peter.hartmann@nokia.com>
* | | Merge branch '4.8' of scm.dev.nokia.troll.no:qt/qtDavid Boddie2011-05-241-17/+17
|\ \ \ | | |/ | |/| | | | | | | | | | | | | | | | Conflicts: src/gui/text/qrawfont.cpp src/gui/text/qtextlayout.cpp src/gui/util/qscroller.cpp src/gui/widgets/qlineedit.cpp
| * | Update licenseheader text in source files for qt4.8Jyri Tahtela2011-05-131-17/+17
| |/ | | | | | | | | | | | | Updated version of LGPL and FDL licenseheaders. Apply release phase licenseheaders for all source files. Reviewed-by: Trust Me
* / Doc: Applied pending fixes to API documentation.David Boddie2011-05-111-1/+1
|/
* Merge remote branch 'origin/4.7' into qt-master-from-4.7Olivier Goffart2011-01-171-1/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: examples/webkit/imageanalyzer/imageanalyzer.h examples/webkit/imageanalyzer/mainwindow.h mkspecs/unsupported/qws/linux-x86-openkode-g++/qplatformdefs.h src/corelib/io/qfsfileengine_iterator_unix.cpp src/corelib/io/qfsfileengine_iterator_win.cpp src/corelib/kernel/qcoreapplication.cpp src/network/access/qnetworkaccessdatabackend.cpp src/plugins/bearer/connman/qconnmanservice_linux.cpp src/plugins/platforms/openvglite/qwindowsurface_vglite.h src/s60installs/bwins/QtCoreu.def src/s60installs/eabi/QtCoreu.def src/s60installs/s60installs.pro tools/assistant/tools/assistant/helpviewer_qwv.h tools/qdoc3/test/qt-html-templates.qdocconf
| * Update copyright year to 2011.Jason McDonald2011-01-111-1/+1
| | | | | | | | Reviewed-by: Trust Me
* | Merge branch 4.7 into qt-master-from-4.7Qt Continuous Integration System2011-01-081-0/+1
|\|
| * QUrl::setUrl should call detachOlivier Goffart2011-01-061-0/+1
| | | | | | | | | | | | Task-number: QTBUG-16425 Reviewed-by: Gabriel Reviewed-by: Markus Goetz
* | Add member-swap to shared datatypes that don't have it.Marc Mutz2010-11-031-0/+8
| | | | | | | | | | | | | | For consistency. Merge-request: 871 Reviewed-by: Olivier Goffart <olivier.goffart@nokia.com>
* | Merge remote branch 'origin/4.7' into qt-master-from-4.7Thiago Macieira2010-09-221-1/+0
|\| | | | | | | | | | | Conflicts: src/gui/painting/qtextureglyphcache_p.h src/opengl/gl2paintengineex/qtextureglyphcache_gl.cpp
| * remove extra includesRitt Konstantin2010-09-211-1/+0
| |
* | Merge remote branch 'origin/4.7' into qt-master-from-4.7Thiago Macieira2010-09-211-6/+19
|\| | | | | | | | | | | | | | | Conflicts: src/corelib/kernel/qobject.h src/declarative/graphicsitems/qdeclarativeflickable.cpp src/declarative/graphicsitems/qdeclarativeflickable_p_p.h src/declarative/util/qdeclarativelistmodel.cpp
| * Update the error handling of invalid hostnames in QUrl.Thiago Macieira2010-09-101-6/+19
| | | | | | | | | | | | | | | | | | | | | | | | This should let QUrl::errorString() show the original, invalid hostname in the URL it reports to be invalid. There may be a side-effect that QUrl::toEncoded() may include the broken hostname on the first call, then miss it in the next calls. But since QUrl::isValid() is returning false, we can consider that the result of toEncoded() is undefined, so anything goes. Reviewed-by: Olivier Goffart
* | Merge remote branch 'origin/4.7' into qt-master-from-4.7Olivier Goffart2010-09-101-1/+25
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: bin/syncqt demos/declarative/snake/content/snake.js demos/declarative/snake/snake.qml doc/src/development/qmake-manual.qdoc src/corelib/plugin/plugin.pri src/gui/kernel/qapplication_win.cpp src/gui/kernel/qdesktopwidget_win.cpp src/gui/painting/qdrawhelper.cpp tests/auto/qdir/tst_qdir.cpp tools/qdoc3/test/assistant.qdocconf tools/qdoc3/test/designer.qdocconf tools/qdoc3/test/linguist.qdocconf
| * Fix handling of braces/no-braces in QUrl::host / setHost.Thiago Macieira2010-09-081-0/+4
| | | | | | | | | | | | | | | | | | The hostname is supposed to be stored in canonical form, with the braces. However, if you call url.setHost("::1"), then a non-canonical hostname is stored. So make the canonicalisation function correct this. Task-number: QTBUG-13464 Reviewed-by: Markus Goetz
| * Doc: update the documentation of QUrl about HTML Form encodingThiago Macieira2010-09-061-0/+20
| | | | | | | | | | | | | | | | | | | | | | HTML forms deviate slightly from URL encoding. They encode spaces as plus signs (+) and the plus sign is encoded as %2b. QUrl is a strict URL/URI tool, so it does not know about HTML form encoding. Add a note to the methods that encode/decode queries about this difference. Task-number: QTBUG-13403
| * Accept empty authority segments in QUrl as different from not-presentThiago Macieira2010-09-031-1/+1
| | | | | | | | | | | | | | | | | | See the task for discussion on why this is necessary and why it is correct from the point of view of the RFC defining URIs. Task-number: QTBUG-8701 Patch-by: Marja Hassinen Signed-Off-By: Thiago Macieira
* | Add support of high unicodes in QUrl.Ritt Konstantin2010-05-261-120/+167
| | | | | | | | | | | | | | | | | | | | | | | | | | Fix some typos in the test data (all 3 typos are already fixed in the original testsuite). Add incorrect utf-8 data (sub)test from nameprep testsuite. Reviewed-by: Andreas Merge-Request: 605 Merge-request: 605 Reviewed-by: Andreas Aardal Hanssen <andreas.aardal.hanssen@nokia.com>
* | Revert "Revert "QUrl::fromLocalFile: fix silly mistake: it's ↵Thiago Macieira2010-05-201-1/+1
| | | | | | | | | | | | fromNativeSeparators, not to"" This reverts commit 82433177590490e6a69074c2d86adaa7741b4913.
* | Revert "Revert "Improve QUrl handling of local file paths""Thiago Macieira2010-05-201-22/+51
|/ | | | This reverts commit 98e935eed5549e479f6666680aed1711dc42111c.
* Merge remote branch 'origin/4.6' into qt-4.7-from-4.6Olivier Goffart2010-05-171-4/+15
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: demos/demos.pro mkspecs/features/resources.prf mkspecs/features/uic.prf src/corelib/io/qurl.cpp src/corelib/tools/qlocale_symbian.cpp src/gui/graphicsview/qgraphicsscene.cpp src/gui/graphicsview/qgraphicswidget_p.cpp src/gui/graphicsview/qgraphicswidget_p.h src/gui/util/qsystemtrayicon_win.cpp src/multimedia/audio/qaudioinput.cpp tests/auto/qhostinfo/qhostinfo.pro
| * Fix QUrl::isValid if the host contains invalid caracter.Olivier Goffart2010-05-141-2/+8
| | | | | | | | | | | | | | If the host contains invalid caracter, QUrl::isValid should return false Task-number: QTBUG-10355 Reviewed-by: thiago
| * QUrl: parsing of host name with an undercore.Olivier Goffart2010-05-141-1/+3
| | | | | | | | | | | | | | | | | | This is not supposed to be allowed, but it work with other browsers Rask-number: QTBUG-7434 Reviewed-by: Thiago Reviewed-by: Markus Goetz (cherry picked from commit a8065da96b96fcc4baeca7615c2a4195c05cbc03)
| * QUrl: fix parsing of IRIs with more than one IDN labelThiago Macieira2010-05-081-0/+1
| | | | | | | | | | Task-number: QTBUG-10511 Reviewed-by: Trust Me
| * QUrl: update the whitelist of IDN domainsThiago Macieira2010-05-081-2/+6
| | | | | | | | The list is taken from the Mozilla page.
* | Revert "Improve QUrl handling of local file paths"Morten Johan Sørvig2010-05-101-51/+22
| | | | | | | | This reverts commit a2f797b52c4274a62a7cf1f0939aca1429afe211.
* | Revert "QUrl::fromLocalFile: fix silly mistake: it's fromNativeSeparators, ↵Morten Johan Sørvig2010-05-101-1/+1
| | | | | | | | | | | | not to" This reverts commit f5366aea8594946e78106c5f93ecb2d47f121d32.
* | Add some debugging (disabled) to QUrl::resolvedThiago Macieira2010-05-071-0/+6
| |
* | QUrl::fromLocalFile: fix silly mistake: it's fromNativeSeparators, not toThiago Macieira2010-05-071-1/+1
| |