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>
This commit is contained in:
parent
add2bf739a
commit
69cd7e8f70
@ -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
|
||||
*/
|
||||
|
Loading…
Reference in New Issue
Block a user