Commit 99f09431 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Minor optimization

parent 69737a22
Pipeline #37614 passed with stage
in 37 minutes and 16 seconds
......@@ -392,12 +392,13 @@ bool ViewerPrivate::deleteAttachment(KMime::Content *node, bool showWarning)
// text/plain part:
KMime::Content *deletePart = new KMime::Content(parent);
deletePart->contentType(true)->setMimeType("text/x-moz-deleted");
deletePart->contentType(false)->setName(QStringLiteral("Deleted: %1").arg(name), "utf8");
auto deleteCt = deletePart->contentType(true);
deleteCt->setMimeType("text/x-moz-deleted");
deleteCt->setName(QStringLiteral("Deleted: %1").arg(name), "utf8");
deletePart->contentDisposition(true)->setDisposition(KMime::Headers::CDattachment);
deletePart->contentDisposition(false)->setFilename(QStringLiteral("Deleted: %1").arg(name));
deletePart->contentType(false)->setCharset("utf-8");
deleteCt->setCharset("utf-8");
deletePart->contentTransferEncoding()->setEncoding(KMime::Headers::CE7Bit);
QByteArray bodyMessage = QByteArrayLiteral(
"\nYou deleted an attachment from this message. The original MIME headers for the attachment were:");
......
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