summaryrefslogtreecommitdiffstats
path: root/src/libraries/qmfclient/qmailmessage.cpp
diff options
context:
space:
mode:
authorDamien Caliste <dcaliste@free.fr>2018-12-13 21:06:54 +0100
committerDamien Caliste <dcaliste@free.fr>2018-12-21 12:41:40 +0000
commitbbd0de450702558918b18558f481e8f1e1cf3879 (patch)
tree2f440c08c30bea8d867f6902891a4c35a89495a6 /src/libraries/qmfclient/qmailmessage.cpp
parent7eb16a2a3b907cbc6612e912401e3d1210d041a9 (diff)
Don't download twice part content in case of signed message with IMAP protocol
There is an issue with the current implementation that downloads twice the part content in case of subparts and signed mails. For instance a mail with this layout: 1: multipart/signed 1.1: text/plain 1.2: image/png 2: application/pgp-signature will trigger in mode RetrievalAction::Auto the following requests: 1-HEADER // as a signed part 1-BODY // as a signed part 1.1-BODY // as a text part 2-BODY // as a non attachment part which will result in text/plain part being downloaded twice and appended twice in a text file. To avoid this, this patch don't append to the list of requests any requests that are within a signed part. Change-Id: I654d020acf2a6a1fe26ae53ad667a84e7ea90c2e Reviewed-by: Matthew Vogt <matthew.vogt@qinetic.com.au>
Diffstat (limited to 'src/libraries/qmfclient/qmailmessage.cpp')
-rw-r--r--src/libraries/qmfclient/qmailmessage.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/libraries/qmfclient/qmailmessage.cpp b/src/libraries/qmfclient/qmailmessage.cpp
index 48b8b026..7c003ee9 100644
--- a/src/libraries/qmfclient/qmailmessage.cpp
+++ b/src/libraries/qmfclient/qmailmessage.cpp
@@ -5823,6 +5823,10 @@ bool QMailMessagePartContainer::Location::operator==(const QMailMessagePartConta
return toString(true) == other.toString(true);
}
+bool QMailMessagePartContainer::Location::operator!=(const QMailMessagePartContainer::Location &other) const
+{
+ return !(*this == other);
+}
/*!
Returns true if the location object contains the location of a valid message part.