diff options
author | Thiago Macieira <thiago.macieira@intel.com> | 2012-05-21 18:44:31 +0200 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-05-22 20:56:38 +0200 |
commit | f0ec001242228bd6ee73ca320a82365a3f9323aa (patch) | |
tree | 32f2d72dfaf412b9f55f22bab03fa53ac4d6a692 /src | |
parent | 4793356ce769b301ff39ce304b731cffc2ad2741 (diff) |
Port away from QUrl::MostDecoded
Since we're about to introduce QUrl::FullyDecoded, this
QUrl::MostDecoded value would be confusing. Replace its uses with what
was intended at the point in question.
Change-Id: Iefd87bc33d37bace507c5cb0f206fa902e08e2df
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Reviewed-by: David Faure <faure@kde.org>
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/corelib/io/qurl.cpp | 4 | ||||
-rw-r--r-- | src/corelib/io/qurlquery.cpp | 6 |
2 files changed, 5 insertions, 5 deletions
diff --git a/src/corelib/io/qurl.cpp b/src/corelib/io/qurl.cpp index de67571053..319de070ee 100644 --- a/src/corelib/io/qurl.cpp +++ b/src/corelib/io/qurl.cpp @@ -505,7 +505,7 @@ recodeFromUser(const QString &input, const ushort *actions, int from, int to) const QChar *begin = input.constData() + from; const QChar *end = input.constData() + to; if (qt_urlRecode(output, begin, end, - QUrl::MostDecoded, actions)) + QUrl::DecodeReserved, actions)) return output; return input.mid(from, to - from); @@ -1021,7 +1021,7 @@ bool QUrlPrivate::setHost(const QString &value, int from, int iend, bool maybePe // check for percent-encoding first QString s; - if (maybePercentEncoded && qt_urlRecode(s, begin, end, QUrl::MostDecoded, 0)) { + if (maybePercentEncoded && qt_urlRecode(s, begin, end, QUrl::DecodeReserved, 0)) { // something was decoded // anything encoded left? if (s.contains(QChar(0x25))) { // '%' diff --git a/src/corelib/io/qurlquery.cpp b/src/corelib/io/qurlquery.cpp index 5625aebd3c..f5ba15a6e8 100644 --- a/src/corelib/io/qurlquery.cpp +++ b/src/corelib/io/qurlquery.cpp @@ -210,7 +210,7 @@ inline QString QUrlQueryPrivate::recodeFromUser(const QString &input) const // note: duplicated in setQuery() QString output; if (qt_urlRecode(output, input.constData(), input.constData() + input.length(), - QUrl::MostDecoded, + QUrl::DecodeReserved, prettyDecodedActions)) return output; return input; @@ -269,7 +269,7 @@ void QUrlQueryPrivate::setQuery(const QString &query) QString key; if (!qt_urlRecode(key, begin, delimiter, - QUrl::MostDecoded, + QUrl::DecodeReserved, prettyDecodedActions)) key = QString(begin, delimiter - begin); @@ -282,7 +282,7 @@ void QUrlQueryPrivate::setQuery(const QString &query) } else { QString value; if (!qt_urlRecode(value, delimiter + 1, pos, - QUrl::MostDecoded, + QUrl::DecodeReserved, prettyDecodedActions)) value = QString(delimiter + 1, pos - delimiter - 1); itemList.append(qMakePair(key, value)); |