Commit 3906a702 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Minor optimization

parent 08e8891d
......@@ -549,16 +549,17 @@ void ViewerPrivate::showAttachmentPopup(KMime::Content *node, const QString &nam
bool deletedAttachment = false;
if (node->contentType(false)) {
deletedAttachment = (node->contentType()->mimeType() == "text/x-moz-deleted");
QString contentTypeStr;
if (auto contentType = node->contentType(false)) {
contentTypeStr = QLatin1String(contentType->mimeType());
deletedAttachment = (contentTypeStr == QStringLiteral("text/x-moz-deleted"));
//Not necessary to show popup menu when attachment was removed
if (deletedAttachment) {
QMenu menu;
const QString contentTypeStr = QLatin1String(node->contentType()->mimeType());
QAction *action
= menu.addAction(QIcon::fromTheme(QStringLiteral("document-open")), i18nc("to open",
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