diff options
author | Thiago Macieira <thiago.macieira@intel.com> | 2016-04-12 14:46:04 -0700 |
---|---|---|
committer | Thiago Macieira <thiago.macieira@intel.com> | 2016-04-13 22:08:26 +0000 |
commit | 77fb9ca271e515f6a147d3dc7025bf3501c70fa0 (patch) | |
tree | 009e993a0e834c664e08ded6f8cf45a929ea58dd /src/corelib | |
parent | 7ab0829823024dd07d15ff6786e3648388d4f28d (diff) |
Fix encoding of IDN hostnames with QUrl::host
When the formatting parameter wasn't exactly QUrl::EncodeUnicode, it
wouldn't encode, despite having to.
Change-Id: Id75834dab9ed466e94c7ffff1444bacc08dd109b
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@theqtcompany.com>
Reviewed-by: Edward Welbourne <edward.welbourne@theqtcompany.com>
Diffstat (limited to 'src/corelib')
-rw-r--r-- | src/corelib/io/qurl.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/corelib/io/qurl.cpp b/src/corelib/io/qurl.cpp index b27321b2a6..fb2f4ba918 100644 --- a/src/corelib/io/qurl.cpp +++ b/src/corelib/io/qurl.cpp @@ -1176,7 +1176,7 @@ inline void QUrlPrivate::appendHost(QString &appendTo, QUrl::FormattingOptions o } else { // this is either an IPv4Address or a reg-name // if it is a reg-name, it is already stored in Unicode form - if (options == QUrl::EncodeUnicode) + if (options & QUrl::EncodeUnicode && !(options & 0x4000000)) appendTo += qt_ACE_do(host, ToAceOnly, AllowLeadingDot); else appendTo += host; |