Commit bd04ca7a authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Port to for(...:...)

parent 7330ee95
Pipeline #54764 passed with stage
in 42 minutes and 7 seconds
......@@ -209,12 +209,14 @@ void TemplateParserJob::processWithIdentity(uint uoid, const KMime::Message::Ptr
MimeTreeParser::MessagePart::Ptr toplevelTextNode(MimeTreeParser::MessagePart::Ptr messageTree)
{
foreach (const auto &mp, messageTree->subParts()) {
const auto subParts = messageTree->subParts();
for (const auto &mp : subParts) {
auto text = mp.dynamicCast<MimeTreeParser::TextMessagePart>();
const auto attach = mp.dynamicCast<MimeTreeParser::AttachmentMessagePart>();
if (text && !attach) {
// TextMessagePart can have several subparts cause of PGP inline, we search for the first part with content
foreach (const auto &sub, mp->subParts()) {
const auto mpSubParts{mp->subParts()};
for (const auto &sub : mpSubParts) {
if (!sub->text().trimmed().isEmpty()) {
return sub;
}
......
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