From f3da3b391ce0ec8b525e1aa1de10e4652dc26c63 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Attila=20T=C5=91k=C3=A9s?= Date: Sun, 16 Feb 2014 19:10:37 +0200 Subject: [PATCH] Qt5 compatibility. --- src/mimepart.cpp | 2 +- src/quotedprintable.cpp | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/mimepart.cpp b/src/mimepart.cpp index 07ff662..443f863 100644 --- a/src/mimepart.cpp +++ b/src/mimepart.cpp @@ -193,7 +193,7 @@ void MimePart::prepare() switch (cEncoding) { case _7Bit: - mimeString.append(QString(content).toAscii()); + mimeString.append(QString(content).toLatin1()); break; case _8Bit: mimeString.append(content); diff --git a/src/quotedprintable.cpp b/src/quotedprintable.cpp index 52b5f13..81af8e3 100644 --- a/src/quotedprintable.cpp +++ b/src/quotedprintable.cpp @@ -29,7 +29,7 @@ QString& QuotedPrintable::encode(const QByteArray &input) { byte = input[i]; - if ((byte == 0x20) || (byte >= 33) && (byte <= 126) && (byte != 61)) + if ((byte == 0x20) || ((byte >= 33) && (byte <= 126) && (byte != 61))) { output->append(byte); } @@ -54,13 +54,13 @@ QByteArray& QuotedPrintable::decode(const QString &input) for (int i = 0; i < input.length(); ++i) { - if (input.at(i).toAscii() == '=') + if (input.at(i).toLatin1() == '=') { - output->append((hexVal[input.at(++i).toAscii() - '0'] << 4) + hexVal[input.at(++i).toAscii() - '0']); + output->append((hexVal[input.at(++i).toLatin1() - '0'] << 4) + hexVal[input.at(++i).toLatin1() - '0']); } else { - output->append(input.at(i).toAscii()); + output->append(input.at(i).toLatin1()); } }