Commit 76774467 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Reduce number of toUpper calling

parent 14728b61
......@@ -757,8 +757,9 @@ QString NodeHelper::fixEncoding(const QString &encoding)
QString returnEncoding = encoding;
// According to http://www.iana.org/assignments/character-sets, uppercase is
// preferred in MIME headers
if (returnEncoding.toUpper().contains(QStringLiteral("ISO "))) {
returnEncoding = returnEncoding.toUpper();
const QString returnEncodingToUpper = returnEncoding.toUpper();
if (returnEncodingToUpper.contains(QStringLiteral("ISO "))) {
returnEncoding = returnEncodingToUpper;
returnEncoding.replace(QLatin1String("ISO "), QStringLiteral("ISO-"));
}
return returnEncoding;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment