summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMontel Laurent <[email protected]>2017-05-30 21:23:01 +0200
committerMontel Laurent <[email protected]>2017-05-30 21:23:01 +0200
commit57b30228ee485b37d1ed8ef96cf9113b59a8aa43 (patch)
tree41063608e7ef20e51ac55a71f98dd21fcb912f5b
parent5b54d0b884ee94a0d5c2f14ca6618867fd5c9404 (diff)
Remove directly header
-rw-r--r--src/filter/filteractions/filteractionremoveheader.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/filter/filteractions/filteractionremoveheader.cpp b/src/filter/filteractions/filteractionremoveheader.cpp
index cf461e1..f780ad2 100644
--- a/src/filter/filteractions/filteractionremoveheader.cpp
+++ b/src/filter/filteractions/filteractionremoveheader.cpp
@@ -67,9 +67,8 @@ FilterAction::ReturnCode FilterActionRemoveHeader::process(ItemContext &context,
KMime::Message::Ptr msg = context.item().payload<KMime::Message::Ptr>();
const QByteArray param(mParameter.toLatin1());
bool headerRemove = false;
- while (msg->headerByType(param.constData())) {
+ while (msg->removeHeader(param.constData())) {
headerRemove = true;
- msg->removeHeader(param.constData());
}
if (headerRemove) {
msg->assemble();