summaryrefslogtreecommitdiffstats
path: root/tests/auto/qurl/tst_qurl.cpp
Commit message (Collapse)AuthorAgeFilesLines
* 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
* | 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-061-1/+1
| | | | 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.
* Import a new implementation of fromUserInput.Thiago Macieira2009-10-291-0/+60
| | | | | | Imported from http://github.com/icefox/guessurlfromstring Licensed under the 3-clause BSD license by the copyright holder.
* Remove the fromUserInput implementation and tests.Thiago Macieira2009-10-291-55/+0
| | | | Reviewed-by: Trust Me
* Fix QUrl regression with setHost("::ffff:129.144.52.38")David Faure2009-10-131-0/+8
| | | | | | | toEncoded was returning an empty host instead of [::ffff:129.144.52.38] Merge-request: 1735 Reviewed-by: Olivier Goffart <ogoffart@trolltech.com>
* QUrl autotest additionsDavid Faure2009-10-071-2/+9
| | | | | | | | | Add autotest which actually passes, the problem (in kurltest) was the underscore in the hostname. Rename ok_hostname to bad_hostname in the error test, for clarity. Merge-request: 1710 Reviewed-by: Thiago Macieira <thiago.macieira@nokia.com>
* Fix regression in QUrl: IPv6 hosts should be lowercased like in Qt-4.5.David Faure2009-10-061-0/+3
| | | | | Merge-Request: 1709 Reviewed-By: Thiago Macieira <thiago.macieira@nokia.com>
* Autotest: add missing copyright attribution for tests copied fromThiago Macieira2009-10-061-0/+20
| | | | kurltest
* Adds QUrl::fromUserInput, gathered from QWebView::guessUrlFromString.Jocelyn Turcotte2009-09-291-0/+65
| | | | Reviewed-by: Thiago Macieira
* Update license headers again.Jason McDonald2009-09-091-4/+4
| | | | Reviewed-by: Trust Me
* Merge branch '4.5' into 4.6Thiago Macieira2009-08-311-13/+13
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: demos/boxes/glshaders.cpp demos/boxes/vector.h demos/embedded/fluidlauncher/pictureflow.cpp demos/embedded/fluidlauncher/pictureflow.h doc/src/desktop-integration.qdoc doc/src/distributingqt.qdoc doc/src/examples-overview.qdoc doc/src/examples.qdoc doc/src/frameworks-technologies/dbus-adaptors.qdoc doc/src/geometry.qdoc doc/src/groups.qdoc doc/src/objecttrees.qdoc doc/src/platform-notes.qdoc doc/src/plugins-howto.qdoc doc/src/qt3support.qdoc doc/src/qtdbus.qdoc doc/src/qtdesigner.qdoc doc/src/qtgui.qdoc doc/src/qtmain.qdoc doc/src/qtopengl.qdoc doc/src/qtsvg.qdoc doc/src/qtuiloader.qdoc doc/src/qundo.qdoc doc/src/richtext.qdoc doc/src/topics.qdoc src/corelib/tools/qdumper.cpp src/gui/embedded/qkbdpc101_qws.cpp src/gui/embedded/qkbdsl5000_qws.cpp src/gui/embedded/qkbdusb_qws.cpp src/gui/embedded/qkbdvr41xx_qws.cpp src/gui/embedded/qkbdyopy_qws.cpp src/gui/embedded/qmousebus_qws.cpp src/gui/embedded/qmousevr41xx_qws.cpp src/gui/embedded/qmouseyopy_qws.cpp src/gui/painting/qpaintengine_d3d.cpp src/gui/painting/qwindowsurface_d3d.cpp src/opengl/gl2paintengineex/glgc_shader_source.h src/opengl/gl2paintengineex/qglpexshadermanager.cpp src/opengl/gl2paintengineex/qglpexshadermanager_p.h src/opengl/gl2paintengineex/qglshader.cpp src/opengl/gl2paintengineex/qglshader_p.h src/opengl/util/fragmentprograms_p.h src/plugins/kbddrivers/linuxis/linuxiskbdhandler.cpp src/plugins/mousedrivers/linuxis/linuxismousehandler.cpp src/script/parser/qscript.g src/script/qscriptarray_p.h src/script/qscriptasm_p.h src/script/qscriptbuffer_p.h src/script/qscriptclass.cpp src/script/qscriptclassdata_p.h src/script/qscriptcompiler.cpp src/script/qscriptcompiler_p.h src/script/qscriptcontext.cpp src/script/qscriptcontext_p.cpp src/script/qscriptcontext_p.h src/script/qscriptcontextfwd_p.h src/script/qscriptecmaarray.cpp src/script/qscriptecmaarray_p.h src/script/qscriptecmaboolean.cpp src/script/qscriptecmacore.cpp src/script/qscriptecmadate.cpp src/script/qscriptecmadate_p.h src/script/qscriptecmaerror.cpp src/script/qscriptecmaerror_p.h src/script/qscriptecmafunction.cpp src/script/qscriptecmafunction_p.h src/script/qscriptecmaglobal.cpp src/script/qscriptecmaglobal_p.h src/script/qscriptecmamath.cpp src/script/qscriptecmamath_p.h src/script/qscriptecmanumber.cpp src/script/qscriptecmanumber_p.h src/script/qscriptecmaobject.cpp src/script/qscriptecmaobject_p.h src/script/qscriptecmaregexp.cpp src/script/qscriptecmaregexp_p.h src/script/qscriptecmastring.cpp src/script/qscriptecmastring_p.h src/script/qscriptengine.cpp src/script/qscriptengine_p.cpp src/script/qscriptengine_p.h src/script/qscriptenginefwd_p.h src/script/qscriptextenumeration.cpp src/script/qscriptextenumeration_p.h src/script/qscriptextqobject.cpp src/script/qscriptextqobject_p.h src/script/qscriptextvariant.cpp src/script/qscriptfunction.cpp src/script/qscriptfunction_p.h src/script/qscriptgc_p.h src/script/qscriptmember_p.h src/script/qscriptobject_p.h src/script/qscriptprettypretty.cpp src/script/qscriptprettypretty_p.h src/script/qscriptvalue.cpp src/script/qscriptvalueimpl.cpp src/script/qscriptvalueimpl_p.h src/script/qscriptvalueimplfwd_p.h src/script/qscriptvalueiteratorimpl.cpp src/script/qscriptxmlgenerator.cpp src/script/qscriptxmlgenerator_p.h tests/auto/linguist/lupdate/testdata/recursivescan/project.ui tests/auto/linguist/lupdate/testdata/recursivescan/sub/finddialog.cpp tests/auto/qkeyevent/tst_qkeyevent.cpp tools/linguist/shared/cpp.cpp
| * Update tech preview license header.Jason McDonald2009-08-311-13/+13
| | | | | | | | Reviewed-by: Trust Me
| * tst_qurl fixed after the great URL replacement spreeJoerg Bornemann2009-08-121-15/+15
| | | | | | | | | | Reviewed-By: mauricek Reviewed-By: thartman
| * Update URL for Qt FTP site.Jason McDonald2009-08-111-22/+22
| | | | | | | | Reviewed-by: Trust Me
| * Update URL for Qt web site.Jason McDonald2009-08-111-39/+39
| | | | | | | | Reviewed-by: Trust Me
| * Update license headers.Jason McDonald2009-08-111-1/+1
| | | | | | | | Reviewed-by: Trust Me
* | Autotest: unbreak test after overeager trolltech.com -> qt.nokia.com replacementThiago Macieira2009-08-181-2/+2
| |
* | Update obsolete URL's in code and docs.Jason McDonald2009-08-121-61/+61
| | | | | | | | Reviewed-by: Trust Me
* | Update contact URL in license headers.Jason McDonald2009-08-121-1/+1
| | | | | | | | Reviewed-by: Trust Me
* | Compile from repo checkoutVolker Hilsheimer2009-07-251-0/+2
| |
* | Improve performance in QUrl parsing by doing in-line operations.Thiago Macieira2009-07-211-2/+2
| | | | | | | | | | | | Unfortunately, I can't do it all inline because the punycode encoding and decoding requires reading the source several times. (Maybe the decoding can be done with some effort in the future)
* | Change qt_nameprep to do in-line namepreppingThiago Macieira2009-07-211-6/+6
| | | | | | | | This will allow to do less allocations in qt_ACE_do.
* | Implement strict STD3 checking of hostnames in URLs.Thiago Macieira2009-07-211-12/+84
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Made the toPunycodeHelper function write to a QString. Renamed qt_from_ACE to qt_ACE_do to indicate what it actually does. Added the STD3 rules for hostnames, forcing hostnames to have to strictly comply to STD3. Also, execute nameprep in the correct order (before trying to encode to Punycode). Validate hostnames when QUrlPrivate::canonicalHost() called, including validation of IP Literals. Validation of IPv4 is missing. Adapted other functions to use qt_ACE_do, notably QUrl::toAce (avoid code duplication).
* | Disable private unit tests when Qt is configured withoutRohan McGovern2009-07-091-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | -developer-build, part 2. Some autotests use private (unexported) code, either because they're testing private classes or because that's the easiest way to test the public classes. Configuring Qt with `-developer-build' is needed for these tests. This commit fixes the tests so configuring without `-developer-build' only builds the tests which strictly use public API.
* | Autotest: remove or correct invalid testsThiago Macieira2009-06-261-20/+3
| | | | | | | | | | | | | | | | | | | | | | In making QUrl more strict with hostnames (to avoid malicious attacks), I'm implementing the STD3 checks described by RFC 3490. These tests are invalid, so they are being removed or corrected. STD3 requires that the hostname be composed of Letters, Digits, Hyphens (so no underlines) and limited to 63 characters. Also, an empty port doesn't make sense.
* | Autotest: Remove faulty test case: xn--fuball-cta.de is not allowedThiago Macieira2009-06-261-3/+1
|/ | | | | | There's only one permitted encoding for a hostname. If "fußball.de" expands to "fussball.de" (due to NFKC), then it can't be equivalent to xn-fuball-cta.de.
* Update license headers as requested by the marketing department.Jason McDonald2009-06-161-2/+2
| | | | Reviewed-by: Trust Me