Changeset View
Changeset View
Standalone View
Standalone View
mimetreeparser/src/bodyformatter/multipartalternative.cpp
Show All 34 Lines | |||||
35 | const Interface::BodyPartFormatter *MultiPartAlternativeBodyPartFormatter::create() | 35 | const Interface::BodyPartFormatter *MultiPartAlternativeBodyPartFormatter::create() | ||
36 | { | 36 | { | ||
37 | if (!self) { | 37 | if (!self) { | ||
38 | self = new MultiPartAlternativeBodyPartFormatter(); | 38 | self = new MultiPartAlternativeBodyPartFormatter(); | ||
39 | } | 39 | } | ||
40 | return self; | 40 | return self; | ||
41 | } | 41 | } | ||
42 | 42 | | |||
43 | Interface::MessagePart::Ptr MultiPartAlternativeBodyPartFormatter::process(Interface::BodyPart &part) const | 43 | MessagePart::Ptr MultiPartAlternativeBodyPartFormatter::process(Interface::BodyPart &part) const | ||
44 | { | 44 | { | ||
45 | KMime::Content *node = part.content(); | 45 | KMime::Content *node = part.content(); | ||
46 | if (node->contents().isEmpty()) { | 46 | if (node->contents().isEmpty()) { | ||
47 | return MessagePart::Ptr(); | 47 | return MessagePart::Ptr(); | ||
48 | } | 48 | } | ||
49 | 49 | | |||
50 | auto preferredMode = part.source()->preferredMode(); | 50 | auto preferredMode = part.source()->preferredMode(); | ||
51 | AlternativeMessagePart::Ptr mp(new AlternativeMessagePart(part.objectTreeParser(), node, preferredMode)); | 51 | AlternativeMessagePart::Ptr mp(new AlternativeMessagePart(part.objectTreeParser(), node, preferredMode)); | ||
Show All 32 Lines |