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

Fix mem leak

parent 4fff608d
Pipeline #25356 passed with stage
in 58 minutes and 32 seconds
......@@ -130,6 +130,7 @@ void ComposerTest::testNonAsciiHeaders()
QCOMPARE(message->cc()->displayNames().constFirst(), ccDisplayName);
QCOMPARE(message->bcc()->displayNames().constFirst(), bccDisplayName);
QCOMPARE(message->replyTo()->displayNames().constFirst(), replyToDisplayName);
message->clear();
delete composer;
composer = nullptr;
}
......
......@@ -415,6 +415,7 @@ void ReplyStrategyTest::testReply()
COMPARE_ADDRESSES(reply->to(), rTo);
COMPARE_ADDRESSES(reply->cc(), rCc);
}
original.clear();
}
QTEST_MAIN(ReplyStrategyTest)
......@@ -318,7 +318,7 @@ void RenderTest::testRender()
const bool bAsync = !asyncFileName.isEmpty();
// load input mail
const KMime::Message::Ptr msg(Test::readAndParseMail(mailFileName));
KMime::Message::Ptr msg(Test::readAndParseMail(mailFileName));
// render the mail
FileHtmlWriter fileWriter(outFileName);
......@@ -363,6 +363,7 @@ void RenderTest::testRender()
testRenderTree(otp.parsedPart());
}
Test::compareFile(outFileName, referenceFileName);
msg.clear();
}
QTEST_MAIN(RenderTest)
......@@ -64,6 +64,7 @@ void AttachmentTest::testEncryptedAttachment()
auto attachments = msg->attachments();
auto encAtts = nodeHelper.attachmentsOfExtraContents();
QCOMPARE(attachments.size() + encAtts.size(), 2);
msg.clear();
}
#include "attachmenttest.moc"
......@@ -100,6 +100,8 @@ void TemplateParserJobTest::test_convertedHtml()
QVERIFY(!convertedHtmlContent.isEmpty());
QCOMPARE(convertedHtmlContent, referenceData);
msg.clear();
origMsg.clear();
delete parser;
}
......@@ -160,6 +162,8 @@ void TemplateParserJobTest::test_replyHtml()
}
QCOMPARE(convertedHtmlContent, referenceData);
msg.clear();
origMsg.clear();
delete parser;
}
......@@ -211,6 +215,8 @@ void TemplateParserJobTest::test_replyPlain()
const QString convertedPlainTextContent = parser->plainMessageText(false, TemplateParser::TemplateParserJob::NoSelectionAllowed);
QCOMPARE(convertedPlainTextContent, referenceData);
msg.clear();
origMsg.clear();
delete parser;
}
......@@ -262,6 +268,9 @@ void TemplateParserJobTest::test_forwardPlain()
const QString convertedPlainTextContent = parser->plainMessageText(false, TemplateParser::TemplateParserJob::NoSelectionAllowed);
QCOMPARE(convertedPlainTextContent, referenceData);
msg.clear();
origMsg.clear();
delete parser;
}
void TemplateParserJobTest::test_forwardHtml_data()
......@@ -316,6 +325,8 @@ void TemplateParserJobTest::test_forwardHtml()
}
QCOMPARE(convertedHtmlContent, referenceData);
msg.clear();
origMsg.clear();
delete parser;
}
......@@ -374,6 +385,9 @@ void TemplateParserJobTest::test_forwardedAttachments()
} else {
QCOMPARE(msg->contents().size(), 0);
}
msg.clear();
origMsg.clear();
delete parser;
}
void TemplateParserJobTest::test_processWithTemplatesForBody_data()
......
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