Changeset View
Changeset View
Standalone View
Standalone View
mimetreeparser/src/viewer/objecttreeparser.cpp
Show First 20 Lines • Show All 41 Lines • ▼ Show 20 Line(s) | |||||
42 | #include "messagepart.h" | 42 | #include "messagepart.h" | ||
43 | #include "partnodebodypart.h" | 43 | #include "partnodebodypart.h" | ||
44 | 44 | | |||
45 | #include "mimetreeparser_debug.h" | 45 | #include "mimetreeparser_debug.h" | ||
46 | 46 | | |||
47 | #include "bodyformatter/utils.h" | 47 | #include "bodyformatter/utils.h" | ||
48 | #include "interfaces/bodypartformatter.h" | 48 | #include "interfaces/bodypartformatter.h" | ||
49 | #include "interfaces/htmlwriter.h" | 49 | #include "interfaces/htmlwriter.h" | ||
50 | #include "interfaces/messagepartrenderer.h" | | |||
51 | #include "utils/util.h" | 50 | #include "utils/util.h" | ||
52 | 51 | | |||
53 | #include <KMime/Headers> | 52 | #include <KMime/Headers> | ||
54 | #include <KMime/Message> | 53 | #include <KMime/Message> | ||
55 | 54 | | |||
56 | // KDE includes | 55 | // KDE includes | ||
57 | 56 | | |||
58 | // Qt includes | 57 | // Qt includes | ||
▲ Show 20 Lines • Show All 120 Lines • ▼ Show 20 Line(s) | 177 | } else if (auto _mp = mp.dynamicCast<AlternativeMessagePart>()) { | |||
179 | if (_mp->mChildNodes.contains(Util::MultipartPlain)) { | 178 | if (_mp->mChildNodes.contains(Util::MultipartPlain)) { | ||
180 | extractNodeInfos(_mp->mChildNodes[Util::MultipartPlain], true); | 179 | extractNodeInfos(_mp->mChildNodes[Util::MultipartPlain], true); | ||
181 | } | 180 | } | ||
182 | } | 181 | } | ||
183 | setPlainTextContent(mp->text()); | 182 | setPlainTextContent(mp->text()); | ||
184 | } | 183 | } | ||
185 | 184 | | |||
186 | if (htmlWriter()) { | 185 | if (htmlWriter()) { | ||
187 | const auto renderer = mSource->messagePartTheme(mParsedPart); | 186 | mSource->render(mParsedPart, htmlWriter()); | ||
188 | if (renderer) { | | |||
189 | htmlWriter()->write(renderer->html()); | | |||
190 | } | | |||
191 | } | 187 | } | ||
192 | } | 188 | } | ||
193 | } | 189 | } | ||
194 | 190 | | |||
195 | MessagePartPtr ObjectTreeParser::parsedPart() const | 191 | MessagePartPtr ObjectTreeParser::parsedPart() const | ||
196 | { | 192 | { | ||
197 | return mParsedPart; | 193 | return mParsedPart; | ||
198 | } | 194 | } | ||
▲ Show 20 Lines • Show All 208 Lines • Show Last 20 Lines |