summaryrefslogtreecommitdiffstats
path: root/src/corelib/io
diff options
context:
space:
mode:
authorKurt Pattyn <pattyn.kurt@gmail.com>2013-10-13 20:14:20 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-10-17 09:50:58 +0200
commit69cd7e8f7001b58939055bf75066b2c439233b0e (patch)
tree8d21ccfe213a1d09c9efeb6cb276d53cde763254 /src/corelib/io
parentadd2bf739ae96603cb919b908cbb53c00d0628cc (diff)
Clarify that the URL scheme does not include the ':'
From the documentation of setScheme it was not clear if the scheme should be terminated by a ':' or not. Documentation has been updated to clarify the expected syntax for the scheme. Change-Id: Ied8533beef7daa12e1d5e7da0649c184efb84522 Reviewed-by: David Faure <david.faure@kdab.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/corelib/io')
-rw-r--r--src/corelib/io/qurl.cpp17
1 files changed, 13 insertions, 4 deletions
diff --git a/src/corelib/io/qurl.cpp b/src/corelib/io/qurl.cpp
index 6b7c5bde2d..fe5faa2be7 100644
--- a/src/corelib/io/qurl.cpp
+++ b/src/corelib/io/qurl.cpp
@@ -1840,12 +1840,21 @@ void QUrl::setUrl(const QString &url, ParsingMode parsingMode)
input. It must also start with an ASCII letter.
The scheme describes the type (or protocol) of the URL. It's
- represented by one or more ASCII characters at the start the URL,
- and is followed by a ':'. The following example shows a URL where
- the scheme is "ftp":
+ represented by one or more ASCII characters at the start the URL.
+
+ A scheme is strictly \l {http://www.ietf.org/rfc/rfc3986.txt} {RFC 3986}-compliant:
+ \tt {scheme = ALPHA *( ALPHA / DIGIT / "+" / "-" / "." )}
+
+ The following example shows a URL where the scheme is "ftp":
\image qurl-authority2.png
+ To set the scheme, the following call is used:
+ \code
+ QUrl url;
+ url.setScheme("ftp");
+ \endcode
+
The scheme can also be empty, in which case the URL is interpreted
as relative.
@@ -3327,7 +3336,7 @@ QString QUrl::fromPercentEncoding(const QByteArray &input)
them to \a include.
Unreserved is defined as:
- ALPHA / DIGIT / "-" / "." / "_" / "~"
+ \tt {ALPHA / DIGIT / "-" / "." / "_" / "~"}
\snippet code/src_corelib_io_qurl.cpp 6
*/