From 1ca791faf5b89c35b4b39d443d2118a882c3946b Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Mon, 21 May 2012 20:21:16 +0200 Subject: Add the QUrl::FullyDecoded flag to the component formatting This allows the QUrl component getters to return fully decoded data, like they did in Qt 4. This is necessary for some use-cases where the component like the user name, password or path are used outside the context of a URL. In those contexts, the percent-encoded data makes no sense, and the loss of data of what could be represented in a URL is acceptable. Also take the opportunity to expand the documentation of those getter methods, explaining what the options argument does. Discussed-on: http://lists.qt-project.org/pipermail/development/2012-May/003811.html Change-Id: I89f743cde78c02f169c88314bff0768714341419 Reviewed-by: Lars Knoll Reviewed-by: David Faure Reviewed-by: Shane Kearns --- src/corelib/io/qurl.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/corelib/io/qurl.h') diff --git a/src/corelib/io/qurl.h b/src/corelib/io/qurl.h index 41e6c17fd5..90b29ed958 100644 --- a/src/corelib/io/qurl.h +++ b/src/corelib/io/qurl.h @@ -145,9 +145,10 @@ public: EncodeDelimiters = 0x400000 | 0x800000, EncodeReserved = 0x1000000, DecodeReserved = 0x2000000, + // 0x4000000 used to indicate full-decode mode FullyEncoded = EncodeSpaces | EncodeUnicode | EncodeDelimiters | EncodeReserved, - MostDecoded = PrettyDecoded | DecodeReserved + FullyDecoded = FullyEncoded | DecodeReserved | 0x4000000 }; Q_DECLARE_FLAGS(ComponentFormattingOptions, ComponentFormattingOption) #ifdef qdoc -- cgit v1.2.3