summaryrefslogtreecommitdiffstats
path: root/src/corelib/io/qurl_p.h
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@intel.com>2012-03-29 22:11:33 -0300
committerQt by Nokia <qt-info@nokia.com>2012-04-11 23:31:41 +0200
commit8d3cb11261fe9d6ec2e071c959b836f7bfadc33d (patch)
tree6d938ebe5b957bf22ab092fd9f2e41525912d411 /src/corelib/io/qurl_p.h
parentdc325aab1820029f6f665080fbadfe11a0ff9c7e (diff)
Make QUrl handle ambiguous delimiters correctly
Refactor the way that QUrl stores and returns the components of the URL so that ambiguous delimiters (gen-delims that could change the meaning of the parsing) are interpreted correctly. Previously, QUrl called "unambiguous" the form found in a full URL, even though each item in isolation could have more characters decoded. Now, instead, store only the fully decoded form. To recreate the compound forms (the full URL, as well as the user info and the authority), we need to do more processing. This commit applies to the user name, password, path and fragment only. The scheme, host and port do not need this work because they are special; the query is handled separately. Change-Id: I5907ba9b8fe048fff23c128be95668c22820663a Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
Diffstat (limited to 'src/corelib/io/qurl_p.h')
-rw-r--r--src/corelib/io/qurl_p.h9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/corelib/io/qurl_p.h b/src/corelib/io/qurl_p.h
index e7b501c0b6..13abeddf9a 100644
--- a/src/corelib/io/qurl_p.h
+++ b/src/corelib/io/qurl_p.h
@@ -72,7 +72,8 @@ public:
Path = 0x20,
Hierarchy = Authority | Path,
Query = 0x40,
- Fragment = 0x80
+ Fragment = 0x80,
+ FullUrl = 0xff
};
enum ErrorCode {
@@ -112,12 +113,12 @@ public:
{ return sectionIsPresent == 0 && port == -1 && path.isEmpty(); }
// no QString scheme() const;
- void appendAuthority(QString &appendTo, QUrl::FormattingOptions options) const;
- void appendUserInfo(QString &appendTo, QUrl::FormattingOptions options) const;
+ void appendAuthority(QString &appendTo, QUrl::FormattingOptions options, Section appendingTo) const;
+ void appendUserInfo(QString &appendTo, QUrl::FormattingOptions options, Section appendingTo) const;
void appendUserName(QString &appendTo, QUrl::FormattingOptions options) const;
void appendPassword(QString &appendTo, QUrl::FormattingOptions options) const;
void appendHost(QString &appendTo, QUrl::FormattingOptions options) const;
- void appendPath(QString &appendTo, QUrl::FormattingOptions options) const;
+ void appendPath(QString &appendTo, QUrl::FormattingOptions options, Section appendingTo) const;
void appendQuery(QString &appendTo, QUrl::FormattingOptions options) const;
void appendFragment(QString &appendTo, QUrl::FormattingOptions options) const;