Commit d423c32f authored by Sandro Knauß's avatar Sandro Knauß
Browse files

Remove usage of MessageCore::NodeHelper

parent 03060cc6
......@@ -26,8 +26,6 @@
#include <Libkleo/CryptoBackendFactory>
#include <MessageCore/NodeHelper>
#include <KMime/Content>
#include "mimetreeparser_debug.h"
......
......@@ -22,7 +22,6 @@
#include "viewer/objecttreeparser.h"
#include "viewer/messagepart.h"
#include <MessageCore/NodeHelper>
#include <KMime/Content>
#include "mimetreeparser_debug.h"
......@@ -52,12 +51,11 @@ Interface::BodyPartFormatter::Result MultiPartMixedBodyPartFormatter::format(Int
Interface::MessagePart::Ptr MultiPartMixedBodyPartFormatter::process(Interface::BodyPart &part) const
{
KMime::Content *child = MessageCore::NodeHelper::firstChild(part.content());
if (!child) {
if (part.content()->contents().isEmpty()) {
return MessagePart::Ptr();
}
// normal treatment of the parts in the mp/mixed container
MimeMessagePart::Ptr mp(new MimeMessagePart(part.objectTreeParser(), child, false));
MimeMessagePart::Ptr mp(new MimeMessagePart(part.objectTreeParser(), part.content()->contents().at(0), false));
return mp;
}
......@@ -22,7 +22,6 @@
#include "viewer/objecttreeparser.h"
#include "viewer/messagepart.h"
#include <MessageCore/NodeHelper>
#include <KMime/Content>
#include <Libkleo/CryptoBackendFactory>
......
......@@ -357,9 +357,8 @@ KMMsgEncryptionState NodeHelper::overallEncryptionState(KMime::Content *node) co
if (encryptionState(node) == KMMsgNotEncrypted) {
// NOTE: children are tested ONLY when parent is not encrypted
KMime::Content *child = MessageCore::NodeHelper::firstChild(node);
if (child) {
myState = overallEncryptionState(child);
if (!node->contents().isEmpty()) {
myState = overallEncryptionState(node->contents().at(0));
} else {
myState = KMMsgNotEncrypted;
}
......@@ -407,9 +406,8 @@ KMMsgSignatureState NodeHelper::overallSignatureState(KMime::Content *node) cons
if (signatureState(node) == KMMsgNotSigned) {
// children are tested ONLY when parent is not signed
KMime::Content *child = MessageCore::NodeHelper::firstChild(node);
if (child) {
myState = overallSignatureState(child);
if (!node->contents().isEmpty()) {
myState = overallSignatureState(node->contents().at(0));
} else {
myState = KMMsgNotSigned;
}
......
......@@ -53,8 +53,6 @@
#include "utils/iconnamecache.h"
#include "utils/mimetype.h"
#include <MessageCore/NodeHelper>
#include <KMime/Headers>
#include <KMime/Message>
......@@ -76,7 +74,6 @@
#include <memory>
using namespace MimeTreeParser;
using namespace MessageCore;
ObjectTreeParser::ObjectTreeParser(const ObjectTreeParser *topLevelParser,
bool showOnlyOneMimePart,
......
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