diff options
author | Thiago Macieira <thiago.macieira@intel.com> | 2012-05-21 17:02:27 +0200 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-05-22 20:56:38 +0200 |
commit | 53d0624403f7f2ac8fe8364a7c5cd136717d40ed (patch) | |
tree | 77318f767dc72709ad74a5c6e9c1a87a5c5aeeb2 /src/corelib/io/qurl.h | |
parent | 239dd9fef153286832c853eefb9fc075a1eafbe3 (diff) |
Add QUrl::ParsingMode to the component setters in QUrl
This allows one to instruct QUrl to ignore the percent-encodings and
interpret the data exactly as provided. This is useful in certain
use-cases where the data comes from a non-URL context.
The strict-mode checking of the components is not implemented
yet. Currently, the behaviour is equal to that of TolerantMode.
Discussed-on: http://lists.qt-project.org/pipermail/development/2012-May/003811.html
Change-Id: Ia5abe045a8ce7f9b50cbce3b5a7e3735e068d03a
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
Diffstat (limited to 'src/corelib/io/qurl.h')
-rw-r--r-- | src/corelib/io/qurl.h | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/corelib/io/qurl.h b/src/corelib/io/qurl.h index 533489ae2b..41e6c17fd5 100644 --- a/src/corelib/io/qurl.h +++ b/src/corelib/io/qurl.h @@ -194,36 +194,36 @@ public: void setScheme(const QString &scheme); QString scheme() const; - void setAuthority(const QString &authority); + void setAuthority(const QString &authority, ParsingMode mode = TolerantMode); QString authority(ComponentFormattingOptions options = PrettyDecoded) const; - void setUserInfo(const QString &userInfo); + void setUserInfo(const QString &userInfo, ParsingMode mode = TolerantMode); QString userInfo(ComponentFormattingOptions options = PrettyDecoded) const; - void setUserName(const QString &userName); + void setUserName(const QString &userName, ParsingMode mode = TolerantMode); QString userName(ComponentFormattingOptions options = PrettyDecoded) const; - void setPassword(const QString &password); + void setPassword(const QString &password, ParsingMode mode = TolerantMode); QString password(ComponentFormattingOptions = PrettyDecoded) const; - void setHost(const QString &host); + void setHost(const QString &host, ParsingMode mode = TolerantMode); QString host(ComponentFormattingOptions = PrettyDecoded) const; QString topLevelDomain(ComponentFormattingOptions options = PrettyDecoded) const; void setPort(int port); int port(int defaultPort = -1) const; - void setPath(const QString &path); + void setPath(const QString &path, ParsingMode mode = TolerantMode); QString path(ComponentFormattingOptions options = PrettyDecoded) const; bool hasQuery() const; - void setQuery(const QString &query); + void setQuery(const QString &query, ParsingMode mode = TolerantMode); void setQuery(const QUrlQuery &query); QString query(ComponentFormattingOptions = PrettyDecoded) const; bool hasFragment() const; QString fragment(ComponentFormattingOptions options = PrettyDecoded) const; - void setFragment(const QString &fragment); + void setFragment(const QString &fragment, ParsingMode mode = TolerantMode); QUrl resolved(const QUrl &relative) const; |