Move attachment logic into MessagePart
ClosedPublic

Authored by knauss on Dec 27 2015, 1:45 PM.

Diff Detail

Repository
R94 PIM: Message Library
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
knauss updated this revision to Diff 1631.Dec 27 2015, 1:45 PM
knauss retitled this revision from to Move attachment logic into MessagePart.
knauss updated this object.
knauss edited the test plan for this revision. (Show Details)
knauss added a reviewer: vkrause.
knauss set the repository for this revision to R43 KDE PIM.
knauss added a project: KDE PIM.
dvratil added inline comments.
messageviewer/src/viewer/messagepart.h
179

I don't see this called anywhere with attachment = false, so maybe you could omit the argument, rename it to setAttachmentNode() and only take attachmentNode argument?

Then you can just check if mAttachmentNode is non-null to determine whether you have an attachment or not?

knauss added inline comments.Dec 28 2015, 2:20 PM
messageviewer/src/viewer/messagepart.h
179

get rid of mAttachment: +1

but renaming is not a good idea,because it is not a attachmentNode of the messagepart - isAttachment is a property of the messagePart itself.
Often the attachmentNode is the parent or grandpartent of the messagePart itself (because, it is the first child kmime of the email).

So I thing renaming it to setAttachmentNode soulds like, it is a attachmentNode of the messagepart.

This revision was automatically updated to reflect the committed changes.