summaryrefslogtreecommitdiffstats
path: root/src/corelib/io/qurlquery.cpp
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@intel.com>2013-07-02 14:42:31 -0700
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-08-04 04:47:52 +0200
commitd5f05557ba9896f626fd20b82eb8c234e0b7bedc (patch)
tree0c8b410fcd5767f7107de673d16fdbeeda6b5bce /src/corelib/io/qurlquery.cpp
parent2ff719de8fe7a6ec40d1e085ad3211a4fd09fe69 (diff)
Doc: update the QUrl and QUrlQuery documentation
Just minor fixes and changes in wording, to support the new understanding of the percent-encoded characters. Change-Id: I77ec10e41f32292d705e4aa8197b9ddce5bef6d2 Reviewed-by: David Faure (KDE) <faure@kde.org>
Diffstat (limited to 'src/corelib/io/qurlquery.cpp')
-rw-r--r--src/corelib/io/qurlquery.cpp16
1 files changed, 15 insertions, 1 deletions
diff --git a/src/corelib/io/qurlquery.cpp b/src/corelib/io/qurlquery.cpp
index 731fea257e..f6b5cd44bd 100644
--- a/src/corelib/io/qurlquery.cpp
+++ b/src/corelib/io/qurlquery.cpp
@@ -82,7 +82,7 @@ QT_BEGIN_NAMESPACE
All of the getter methods in QUrlQuery support an optional parameter of type
QUrl::ComponentFormattingOptions, including query(), which dictate how to
- encode the data in question. Regardless of the mode, the returned value must
+ encode the data in question. Except for QUrl::FullyDecoded, the returned value must
still be considered a percent-encoded string, as there are certain values
which cannot be expressed in decoded form (like control characters, byte
sequences not decodable to UTF-8). For that reason, the percent character is
@@ -104,6 +104,20 @@ QT_BEGIN_NAMESPACE
"+" sequences found in the keys, values, or query string are left exactly
like written (except for the uppercasing of "%2b" to "%2B").
+ \section2 Full decoding
+
+ With QUrl::FullyDecoded formatting, all percent-encoded sequences will be
+ decoded fully and the '%' character is used to represent itself.
+ QUrl::FullyDecoded should be used with care, since it may cause data loss.
+ See the documentation of QUrl::FullyDecoded for information on what data may
+ be lost.
+
+ This formatting mode should be used only when dealing with text presented to
+ the user in contexts where percent-encoding is not desired. Note that
+ QUrlQuery setters and query methods do not support the counterpart
+ QUrl::DecodedMode parsing, so using QUrl::FullyDecoded to obtain a listing of
+ keys may result in keys not found in the object.
+
\section1 Non-standard delimiters
By default, QUrlQuery uses an equal sign ("=") to separate a key from its