diff options
author | Thiago Macieira <thiago.macieira@intel.com> | 2012-03-29 22:19:13 -0300 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-04-04 17:35:33 +0200 |
commit | 9a09b0c08c41e2153b79aa7848bd7206f4e11d19 (patch) | |
tree | 0758ba3590dbb2644652ccceead179be319c16b3 /src | |
parent | 0d5fb8f522732934f121bdf8a30adcb64a730de4 (diff) |
Merge one static function into another
One static function was only being used by the other, so just merge
them and reduce the work for the compiler.
Change-Id: Ia7a1c46ace6254633450632fae7ab35816ff13bf
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/corelib/io/qurl.cpp | 18 |
1 files changed, 5 insertions, 13 deletions
diff --git a/src/corelib/io/qurl.cpp b/src/corelib/io/qurl.cpp index 270a1db3f4..9753474617 100644 --- a/src/corelib/io/qurl.cpp +++ b/src/corelib/io/qurl.cpp @@ -392,24 +392,16 @@ static const ushort * const encodedQueryActions = encodedFragmentActions + 4; // static inline QString -recode(const QString &input, const ushort *actions, QUrl::ComponentFormattingOptions encoding, - int from, int iend) +recodeFromUser(const QString &input, const ushort *actions, int from, int to) { QString output; const QChar *begin = input.constData() + from; - const QChar *end = input.constData() + iend; - if (qt_urlRecode(output, begin, end, encoding, actions)) + const QChar *end = input.constData() + to; + if (qt_urlRecode(output, begin, end, + QUrl::DecodeUnicode | QUrl::DecodeAllDelimiters | QUrl::DecodeSpaces, actions)) return output; - return input.mid(from, iend - from); -} - -static inline QString -recodeFromUser(const QString &input, const ushort *actions, int from, int end) -{ - return recode(input, actions, - QUrl::DecodeUnicode | QUrl::DecodeAllDelimiters | QUrl::DecodeSpaces, - from, end); + return input.mid(from, to - from); } void QUrlPrivate::appendAuthority(QString &appendTo, QUrl::FormattingOptions options) const |