diff options
author | Saturneric <[email protected]> | 2021-07-14 17:57:39 +0000 |
---|---|---|
committer | Saturneric <[email protected]> | 2021-07-14 17:57:39 +0000 |
commit | e7ec8d7b60418cc2cb4618e1c7e14fff77db4e07 (patch) | |
tree | e3948060aa3de12ed2c35fcdd671f91802b769d3 /src/gpg/GpgContext.cpp | |
parent | Repair and adjust the SMTP library. (diff) | |
download | GpgFrontend-e7ec8d7b60418cc2cb4618e1c7e14fff77db4e07.tar.gz GpgFrontend-e7ec8d7b60418cc2cb4618e1c7e14fff77db4e07.zip |
Repair and adjust code and modules
Diffstat (limited to '')
-rw-r--r-- | src/gpg/GpgContext.cpp | 55 |
1 files changed, 0 insertions, 55 deletions
diff --git a/src/gpg/GpgContext.cpp b/src/gpg/GpgContext.cpp index 028653b7..7ec521a7 100644 --- a/src/gpg/GpgContext.cpp +++ b/src/gpg/GpgContext.cpp @@ -25,7 +25,6 @@ #include "gpg/GpgContext.h" #include <unistd.h> /* contains read/write */ -#include <Mime.h> #ifdef _WIN32 @@ -430,38 +429,6 @@ namespace GpgME { return err; } - - /** - * if this is mime, split text and attachments... - * message contains only text afterwards - */ - void parseMime(QByteArray *message) { - - QString pText; - bool show_ma_dock = false; - - Mime *mime = new Mime(message); - for (MimePart tmp : mime->parts()) { - if (tmp.header.getValue("Content-Type") == "text/plain" && - tmp.header.getValue("Content-Transfer-Encoding") != "base64") { - QByteArray body; - if (tmp.header.getValue("Content-Transfer-Encoding") == "quoted-printable") { - Mime::quotedPrintableDecode(tmp.body, body); - } else { - body = tmp.body; - } - pText.append(QString(body)); - } else { - // TODO - show_ma_dock = true; - } - } - *message = pText.toUtf8(); - if (show_ma_dock) { - // TODO - } - } - /** Decrypt QByteAarray, return QByteArray * mainly from http://basket.kde.org/ (kgpgme.cpp) */ @@ -496,28 +463,6 @@ namespace GpgME { gpgme_data_release(dataOut); } - /* - * 1) is it mime (content-type:) - * 2) parse header - * 2) choose action depending on content-type - */ - if (Mime::isMime(outBuffer)) { - Header header = Mime::getHeader(outBuffer); - // is it multipart, is multipart-parsing enabled - if (header.getValue("Content-Type") == "multipart/mixed" - && settings.value("mime/parseMime").toBool()) { - parseMime(outBuffer); - } else if (header.getValue("Content-Type") == "text/plain" - && settings.value("mime/parseQP").toBool()) { - if (header.getValue("Content-Transfer-Encoding") == "quoted-printable") { - auto *decoded = new QByteArray(); - Mime::quotedPrintableDecode(*outBuffer, *decoded); - //TODO: remove header - outBuffer = decoded; - } - } - } - if (result != nullptr) { *result = m_result; } |