From 7590ca03ced07f1a3e9d1aab30e6d5b239009ac4 Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Tue, 22 May 2012 15:16:01 +0200 Subject: 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 --- src/corelib/io/qurl.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/corelib/io/qurl.cpp b/src/corelib/io/qurl.cpp index 6494590679..dc207d52fd 100644 --- a/src/corelib/io/qurl.cpp +++ b/src/corelib/io/qurl.cpp @@ -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(); } -- cgit v1.2.3