summaryrefslogtreecommitdiffstats
path: root/tests/auto/qurl
Commit message (Collapse)AuthorAgeFilesLines
* Limit the range of the QUrlPrivate::port to -1 to 65535Thiago Macieira2013-01-141-0/+11
| | | | | | | | | | | | | 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-0/+4
| | | | | | | | | | 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-132-2/+2
| | | | | | 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-0/+24
| | | | | | | | | ... 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-0/+6
| | | | | | | | | | | 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-292-48/+48
| | | | | | | | 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-0/+83
| | | | | | | | | | | | | | | 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-012-4/+4
| | | | | | | | | | | | | - 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: add missing detach() in setEncodedUrl, spotted by Marc Mutz.David Faure2012-07-221-0/+6
| | | | | | | Reported-by: Marc Mutz <marc.mutz@kdab.com> Change-Id: If53957bafa9c077981c8ec5107313bc25469b579 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Change QUrl::toLocalFile to return path for relative urlsAapo Haapanen2012-02-021-3/+5
| | | | | | | | | | | | | | | | | | 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>
* Update year in Nokia copyright messages.Jason McDonald2012-01-112-2/+2
| | | | | | | | | 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>
* tests: eliminated usage of qttest_p4.prfSergio Ahumada2011-12-251-3/+4
| | | | | | | | | qttest_p4.prf was added as a convenience for Qt's own autotests in Qt4. It enables various crufty undocumented magic, of dubious value. Stop using it, and explicitly enable the things from it which we want. Change-Id: If1f16810614f7965dc7d5bf680effed911bee114 Reviewed-by: Jason McDonald
* Fix invalid read in QUrl::removeAllEncodedQueryItemsOlivier Goffart2011-06-281-3/+25
| | | | | | | | | | | | | | | | | | | 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 'master' of scm.dev.nokia.troll.no:qt/qt-symbian-staging into ↵Qt Continuous Integration System2011-06-071-2/+2
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | master-integration * 'master' of scm.dev.nokia.troll.no:qt/qt-symbian-staging: (25 commits) Horizontal lines appearing under entered characters Move qts60plugindeployment rule to correct scope Skipping tst_QEventLoop::processEventsExcludeSocket for qws Fixed compile of tst_qscriptextensionplugin on some Windows configurations QS60Style: Checked state is not shown on highlighted itemview item Removing unused code after introduction of round robin scheduler tst_qeventloop runs the event loop to ensure socket messages arrive Schedule Symbian active objects with a round robin scheduler Fix the build break for QUrl autotest on Symbian Fixed def files for WINSCW Fixed def files for ARMV5 Fix the build break for QStyleSheetStyle autotest on Symbian Fix bug about daylight saving missing on Symbian platfrom. Fix the build break caused by the missing parameter for QSKIP macro. Document the Symbian main window size issue at application start. QS60Style: icon is not shown correctly in a menu item in all cases QS60Style: Remove 3.x specific code from style Fix Coverity issues found from QS60Style Removed qts60plugin references also from config.profiles Remove s60 plugin dll from the iby file too. ...
| * Fix the build break for QUrl autotest on SymbianDmitry Trofimov2011-06-011-2/+2
| | | | | | | | | | | | This commit fixes the linking problem for QUrl autotest on Symbian Reviewed by: Guoqing Zhang
* | Merge remote-tracking branch 'origin/4.8'Olivier Goffart2011-05-242-34/+34
|\ \ | |/
| * Update licenseheader text in source files for qt4.8Jyri Tahtela2011-05-132-34/+34
| | | | | | | | | | | | | | Updated version of LGPL and FDL licenseheaders. Apply release phase licenseheaders for all source files. Reviewed-by: Trust Me
* | Add QUrl::topLevelDomain() and move TLD table from QtNetwork to QtCoreRobert Hogan2011-05-241-0/+26
|/ | | | | | | | | | | | | | | | | | | | | | 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 remote branch 'origin/4.7' into qt-master-from-4.7Olivier Goffart2011-01-172-2/+2
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-102-2/+2
| | | | | | | | Reviewed-by: Trust Me
* | Merge branch 4.7 into qt-master-from-4.7Qt Continuous Integration System2011-01-071-0/+8
|\ \ | |/
| * QUrl::setUrl should call detachOlivier Goffart2011-01-061-0/+8
| | | | | | | | | | | | Task-number: QTBUG-16425 Reviewed-by: Gabriel Reviewed-by: Markus Goetz
* | QtCore autotests: make them paralelized.Olivier Goffart2010-11-101-0/+1
| | | | | | | | | | | | | | | | | | | | | | The filesystem autotests are not paralized (because i was scary) For reference, script I used: cat corelib.pro | grep -v "=" | grep \\\\ | cut -f1 -d\\ | sed "s/\(.*\) /\1/" | grep -v file | xargs -I{} echo "echo CONFIG += parallel_test >> {}/{}.pro" > t . t Reviexed-by: Joao
* | Add member-swap to shared datatypes that don't have it.Marc Mutz2010-11-031-0/+9
| | | | | | | | | | | | | | 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-211-0/+10
|\ \ | |/ | | | | | | | | | | | | 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-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | 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/+18
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-1/+5
| | | | | | | | | | | | | | | | | | 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
| * Accept empty authority segments in QUrl as different from not-presentThiago Macieira2010-09-031-0/+13
| | | | | | | | | | | | | | | | | | 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-12/+52
| | | | | | | | | | | | | | | | | | | | | | | | | | 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 "Improve QUrl handling of local file paths""Thiago Macieira2010-05-201-1/+10
|/ | | | This reverts commit 98e935eed5549e479f6666680aed1711dc42111c.
* Merge remote branch 'origin/4.6' into qt-4.7-from-4.6Olivier Goffart2010-05-171-7/+46
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-7/+20
| | | | | | | | | | | | | | 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/+5
| | | | | | | | | | | | | | | | | | 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/+26
| | | | | | | | | | Task-number: QTBUG-10511 Reviewed-by: Trust Me
* | Run autotests with minimal capabilitiesShane Kearns2010-05-101-0/+1
| | | | | | | | | | | | | | | | | | | | | | The autotests were previously run with ALL-Tcb capability which gives them more access to the filesystem etc. than a typical Qt application. To have more realistic testing environmnent, tests are run with no capabilities other than those required for the Qt APIs they use. i.e. NetworkServices for network tests, None for others. Reviewed-by: Liang Qi
* | QUrl: parsing of host name with an undercore.Olivier Goffart2010-04-281-1/+5
| | | | | | | | | | | | | | | | This is not supposed to be allowed, but it work with other browsers Rask-number: QTBUG-7434 Reviewed-by: Thiago Reviewed-by: Markus Goetz
* | Added test for QTBUG-6962: Empty authority ignored by QUrl::setAuthority.Kimmo Kotajärvi2010-03-051-0/+9
|/ | | | | Merge-request: 482 Reviewed-by: Thiago Macieira <thiago.macieira@nokia.com>
* Cleaning of the patch to QTBUG-3168Benjamin Poulain2010-02-251-1/+0
| | | | | | | Removing trailing whitespace from qurl.cpp Removing a debug() output from the test. Reviewed-by: Benjamin Poulain <benjamin.poulain@nokia.com>
* Patch to QTBUG-3168Carolina Gomes2010-02-251-3/+0
| | | | | | | Patch to QTBUG-3168 and update tst_qurl to enable the test case that was skipped. Reviewed-by: Benjamin Poulain <benjamin.poulain@nokia.com>
* doc: Fixed several typos.Martin Smith2010-02-121-1/+1
| | | | Task: QTBUG-7997
* Autotest: add a test for allowing hostnames ending in dotThiago Macieira2010-01-221-0/+22
| | | | Also, since domain is never empty, the idx > 0 test is unnecessary.
* Revert "Make an empty QUrl also be considered non-detached (d == 0)."Thiago Macieira2010-01-211-20/+0
| | | | | | as agreed with Warwick. This reverts commit 089ee7094eabb2058b478f5d2f306a69f6c0b3bf.
* Make an empty QUrl also be considered non-detached (d == 0).Thiago Macieira2010-01-071-0/+20
| | | | Reviewed-by: Trust Me
* Update copyright year to 2010Jason McDonald2010-01-062-2/+2
| | | | Reviewed-by: Trust Me
* QUrl::toEncoded() fix for the case of "password, but no username".David Faure2009-12-281-0/+7
| | | | | | | | | | QUrl::setPassword() without QUrl::setUserName() is actually useful, e.g. for kde's ldap:// slave. QUrl::toString() already handled this correctly, but QUrl::toEncoded() would forget the password in such a case. Autotest added. Merge-request: 2276 Reviewed-by: Olivier Goffart <ogoffart@trolltech.com>
* QUrl::fromUserInput: improvements, corrections and make the demoJocelyn Turcotte2009-11-121-2/+6
| | | | | | | | | | | | | browser use it. - Handle windows files names by looking for paths first (and don't check that it exists first) - Handle host names without dots (it was not handled because of difficulties with the case host:port) - Return the parsed url only if the host or the path is not empty instead of returning a url that looks like "http:" Reviewed-by: Thiago Macieira
* Autotest: add a few more tests for Unicode (IDN) supportThiago Macieira2009-10-291-2/+5
|
* Autotest: add one test that was in the previous implementation but missing hereThiago Macieira2009-10-291-0/+1
|
* Autotest: use example.org and example.netThiago Macieira2009-10-291-12/+12
| | | | | | No need to publicise real sites and email addresses. Also, don't use 8-bit data. C escape sequences are ok.