summaryrefslogtreecommitdiffstats
path: root/src/corelib/io
diff options
context:
space:
mode:
authorMårten Nordheim <marten.nordheim@qt.io>2017-06-27 12:02:24 +0200
committerMårten Nordheim <marten.nordheim@qt.io>2017-06-29 10:15:30 +0000
commit5cc5c97554c1e0010f3d2e0ab379a68743b66b53 (patch)
tree4ba1ba3ee8076e5cc9ae30d87647a1af069a6b11 /src/corelib/io
parent3aed1fccda2e3bcc0d8328543ef511b411b230d6 (diff)
Doc: Add note about fromPercentEncoding's behavior on invalid input
Add a note saying that invalid input to QByteArray::fromPercentEncoding and QUrl::fromPercentEncoding will produce invalid output, and provide an example. Change-Id: Icc68f59c23cf199640b646cd4a6ca8e4808a3f71 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/corelib/io')
-rw-r--r--src/corelib/io/qurl.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/corelib/io/qurl.cpp b/src/corelib/io/qurl.cpp
index 9663235a67..ac694a464a 100644
--- a/src/corelib/io/qurl.cpp
+++ b/src/corelib/io/qurl.cpp
@@ -3440,6 +3440,10 @@ QUrl QUrl::fromEncoded(const QByteArray &input, ParsingMode mode)
/*!
Returns a decoded copy of \a input. \a input is first decoded from
percent encoding, then converted from UTF-8 to unicode.
+
+ \note Given invalid input (such as a string containing the sequence "%G5",
+ which is not a valid hexadecimal number) the output will be invalid as
+ well. As an example: the sequence "%G5" could be decoded to 'W'.
*/
QString QUrl::fromPercentEncoding(const QByteArray &input)
{