summaryrefslogtreecommitdiffstats
path: root/src/corelib/io/qurl_p.h
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@intel.com>2012-08-16 15:31:06 +0200
committerQt by Nokia <qt-info@nokia.com>2012-08-20 21:59:32 +0200
commitce9b010ec619aa6e5f19b6ae208b76a4e398b20b (patch)
tree7eccc6c7a4a5654dae1956df4a3f262dd8c0f109 /src/corelib/io/qurl_p.h
parent60818231d82ca34f1d33ccb9ba7500b5470a3d0d (diff)
Fix decoding of QByteArray in the deprecated "encoded" setters in QUrl
The asymmetry is intentional: the getters can use toLatin1() because the called functions, with a QUrl::FullyEncoded parameter, return ASCII only. This gives a small performance improvement over the need to run the UTF-8 encoder. However, the data passed to setters could contain non-ASCII binary data, in addition to the percent-encoded data. We can't use fromUtf8 because it's binary and we can't use toPercentEncoded because it already encoded. Change-Id: I5ecdb49be5af51ac86fd9764eb3a6aa96385f512 Reviewed-by: David Faure <faure@kde.org>
Diffstat (limited to 'src/corelib/io/qurl_p.h')
-rw-r--r--src/corelib/io/qurl_p.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/corelib/io/qurl_p.h b/src/corelib/io/qurl_p.h
index e55ba4a52a..7c4beccb02 100644
--- a/src/corelib/io/qurl_p.h
+++ b/src/corelib/io/qurl_p.h
@@ -182,6 +182,7 @@ extern Q_AUTOTEST_EXPORT void qt_nameprep(QString *source, int from);
extern Q_AUTOTEST_EXPORT bool qt_check_std3rules(const QChar *uc, int len);
extern Q_AUTOTEST_EXPORT void qt_punycodeEncoder(const QChar *s, int ucLength, QString *output);
extern Q_AUTOTEST_EXPORT QString qt_punycodeDecoder(const QString &pc);
+extern Q_AUTOTEST_EXPORT QString qt_urlRecodeByteArray(const QByteArray &ba);
QT_END_NAMESPACE