diff options
author | David Faure <david.faure@kdab.com> | 2020-06-26 11:06:49 +0200 |
---|---|---|
committer | David Faure <david.faure@kdab.com> | 2020-06-29 16:45:31 +0200 |
commit | eb546469849d2bf560f41b14366832e1f8b22456 (patch) | |
tree | d857134211ab98514df344ff3beb98e1c13645f6 /src/corelib/io/qurlrecode.cpp | |
parent | 76f45e6e972f6fdf26102a685ab9205c04ee9172 (diff) |
Fix QUrl::toDisplayString(PreferLocalFile) returning an encoded path
It's supposed to return the same as toLocalFile(), for local files,
which means passing QUrl::FullyDecoded just like QUrl::toLocalFile()
does.
But a few code paths were testing component formatting options without masking
other FormattingOptions like RemovePassword, so this had to be fixed.
Fixes: QTBUG-84594
Change-Id: I82f15148b6d93516200f9ad6258d474e7f10924a
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/corelib/io/qurlrecode.cpp')
-rw-r--r-- | src/corelib/io/qurlrecode.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/corelib/io/qurlrecode.cpp b/src/corelib/io/qurlrecode.cpp index 115ad7f42c..ad23588978 100644 --- a/src/corelib/io/qurlrecode.cpp +++ b/src/corelib/io/qurlrecode.cpp @@ -676,7 +676,7 @@ qt_urlRecode(QString &appendTo, QStringView in, QUrl::ComponentFormattingOptions encoding, const ushort *tableModifications) { uchar actionTable[sizeof defaultActionTable]; - if (encoding == QUrl::FullyDecoded) { + if ((encoding & QUrl::FullyDecoded) == QUrl::FullyDecoded) { return int(decode(appendTo, in)); } |