Members of the KDE Community are recommended to subscribe to the kde-community mailing list at https://mail.kde.org/mailman/listinfo/kde-community to allow them to participate in important discussions and receive other important announcements

Commit 121f49f9 authored by Laurent Montel's avatar Laurent Montel 😁

COnst'ify + rename method

parent 9ac54dab
......@@ -359,7 +359,7 @@ void DefaultRendererPrivate::render(const MimeMessagePart::Ptr &mp, HtmlWriter *
if (mp->isAttachment()) {
aBlock = HTMLBlock::Ptr(new AttachmentMarkBlock(htmlWriter, mp->attachmentContent()));
}
auto preferredMode = mp->source()->preferredMode();
if (mp->isRoot()) {
rBlock = HTMLBlock::Ptr(new RootBlock(htmlWriter));
}
......@@ -403,7 +403,7 @@ void DefaultRendererPrivate::render(const HtmlMessagePart::Ptr &mp, HtmlWriter *
c.insert(QStringLiteral("block"), &block);
auto preferredMode = mp->source()->preferredMode();
bool isHtmlPreferred = (preferredMode == MimeTreeParser::Util::Html) || (preferredMode == MimeTreeParser::Util::MultipartHtml);
const bool isHtmlPreferred = (preferredMode == MimeTreeParser::Util::Html) || (preferredMode == MimeTreeParser::Util::MultipartHtml);
block.setProperty("htmlMail", isHtmlPreferred);
block.setProperty("loadExternal", htmlLoadExternal());
block.setProperty("isPrinting", isPrinting());
......
......@@ -97,7 +97,7 @@ const QTextCodec *MailViewerSource::overrideCodec()
QString MailViewerSource::createMessageHeader(KMime::Message *message)
{
return mViewer->writeMsgHeader(message);
return mViewer->writeMessageHeader(message);
}
const AttachmentStrategy *MailViewerSource::attachmentStrategy() const
......
......@@ -989,7 +989,7 @@ void ViewerPrivate::parseContent(KMime::Content *content)
KMime::Message *message = dynamic_cast<KMime::Message *>(content);
if (message) {
htmlWriter()->write(writeMsgHeader(message, hasVCard ? vCardContent : nullptr, true));
htmlWriter()->write(writeMessageHeader(message, hasVCard ? vCardContent : nullptr, true));
}
// Pass control to the OTP now, which does the real work
......@@ -1021,10 +1021,10 @@ void ViewerPrivate::parseContent(KMime::Content *content)
showHideMimeTree();
}
QString ViewerPrivate::writeMsgHeader(KMime::Message *aMsg, KMime::Content *vCardNode, bool topLevel)
QString ViewerPrivate::writeMessageHeader(KMime::Message *aMsg, KMime::Content *vCardNode, bool topLevel)
{
if (!headerStylePlugin()) {
qCCritical(MESSAGEVIEWER_LOG) << "trying to writeMsgHeader() without a header style set!";
qCCritical(MESSAGEVIEWER_LOG) << "trying to writeMessageHeader() without a header style set!";
return {};
}
QString href;
......
......@@ -274,7 +274,7 @@ public:
/** Creates a nice mail header depending on the current selected
header style. */
QString writeMsgHeader(KMime::Message *aMsg, KMime::Content *vCardNode = nullptr, bool topLevel = false);
QString writeMessageHeader(KMime::Message *aMsg, KMime::Content *vCardNode = nullptr, bool topLevel = false);
/** show window containing information about a vCard. */
void showVCard(KMime::Content *msgPart);
......
......@@ -106,7 +106,7 @@ public:
part.processResult()->setInlineEncryptionState(mp->encryptionState());
auto preferredMode = part.source()->preferredMode();
bool isHtmlPreferred = (preferredMode == Util::Html) || (preferredMode == Util::MultipartHtml);
const bool isHtmlPreferred = (preferredMode == Util::Html) || (preferredMode == Util::MultipartHtml);
if (node->parent() && node->parent()->contentType()->subType() == "related" && isHtmlPreferred) {
part.nodeHelper()->setNodeDisplayedEmbedded(node, true);
part.nodeHelper()->setNodeDisplayedHidden(node, true);
......
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