Ensure that no extra bits can leak into QUrl::toEncoded.
Technically, this function should take QUrl::UrlFormattingOptions, but that doesn't exist. So we just mask out the high bits that determine the encoding options. toEncoded only supports one encoding way: fully encoded. Change-Id: I1445ad7c292500921ec2672be4524d7d76a39f98 Reviewed-by: David Faure <faure@kde.org>
This commit is contained in:
parent
d921182310
commit
7590ca03ce
@ -2486,7 +2486,7 @@ QString QUrl::toDisplayString(FormattingOptions options) const
|
||||
*/
|
||||
QByteArray QUrl::toEncoded(FormattingOptions options) const
|
||||
{
|
||||
options &= ~DecodeReserved;
|
||||
options &= ~(FullyDecoded | FullyEncoded);
|
||||
QString stringForm = toString(options | FullyEncoded);
|
||||
return stringForm.toLatin1();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user