Commit 0961582c authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Minor optimization

parent c2965204
Pipeline #25620 passed with stage
in 59 minutes and 14 seconds
......@@ -59,7 +59,7 @@ public:
{
KMime::Message *const message = dynamic_cast<KMime::Message *>(content);
if (message && message->subject(false)) {
return message->subject()->asUnicodeString();
return message->subject(false)->asUnicodeString();
}
const QString name = MimeTreeParser::NodeHelper::fileName(content);
if (!name.isEmpty()) {
......
......@@ -288,7 +288,7 @@ void ViewerPrivate::openAttachment(KMime::Content *node, const QUrl &url)
return;
}
if (ct->mimeType() == "message/external-body") {
if (node->contentType()->hasParameter(QStringLiteral("url"))) {
if (ct->hasParameter(QStringLiteral("url"))) {
KIO::OpenUrlJob *job = new KIO::OpenUrlJob(url, QStringLiteral("text/html"));
job->setUiDelegate(new KIO::JobUiDelegate(KJobUiDelegate::AutoHandlingEnabled, q));
job->setRunExecutables(true);
......
......@@ -98,9 +98,9 @@ MessagePart::Ptr EncryptedBodyPartFormatter::process(Interface::BodyPart &part)
NodeHelper::magicSetType(tempNode);
if (node->topLevel()->textContent() != node && node->contentDisposition(false) && !tempNode->contentDisposition(false)) {
tempNode->contentDisposition()->setDisposition(node->contentDisposition()->disposition());
const auto fname = node->contentDisposition()->filename();
const auto fname = node->contentDisposition(false)->filename();
if (!fname.isEmpty()) {
tempNode->contentDisposition()->setFilename(fname);
tempNode->contentDisposition(false)->setFilename(fname);
}
}
......
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