Port the WKS formatter to the new rendering API
ClosedPublic

Authored by vkrause on Oct 8 2017, 9:01 AM.

Diff Detail

Repository
R81 KDE PIM Addons
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
vkrause created this revision.Oct 8 2017, 9:01 AM
Restricted Application added a project: KDE PIM. · View Herald TranscriptOct 8 2017, 9:01 AM
Restricted Application added a subscriber: KDE PIM. · View Herald Transcript
knauss added inline comments.Oct 9 2017, 9:38 AM
plugins/messageviewer/bodypartformatter/autotests/data/wks-confirmation-request-multipart-decrypted.mbox.html
29

right-to-left support?

plugins/messageviewer/bodypartformatter/gnupgwks/gnupgwksformatter.cpp
94

should be start and handled via memento to not block kmail. but this is another issue.

plugins/messageviewer/bodypartformatter/gnupgwks/plugin.cpp
30–31

why resort the Index?

dvratil added a subscriber: dvratil.Oct 9 2017, 2:01 PM
dvratil added inline comments.
plugins/messageviewer/bodypartformatter/gnupgwks/plugin.cpp
31

Because the emails sent by the WKD server are actually multipart/mixed emails with special parts - we inspect those parts in this plugin and if one of the parts contains application/vnd.gnupg.keys we handle the entire email specially in this plugin and otherwise we pass them back to the regular multipart/mixed handler.

vkrause added inline comments.Oct 9 2017, 7:28 PM
plugins/messageviewer/bodypartformatter/autotests/data/wks-confirmation-request-multipart-decrypted.mbox.html
29

possible, but this was broken before already then, the output wasn't changed by this patch

plugins/messageviewer/bodypartformatter/gnupgwks/gnupgwksformatter.cpp
94

very valid concern, but also not introduced by this patch

plugins/messageviewer/bodypartformatter/gnupgwks/plugin.cpp
30–31

because we have a processing plugin for all three, but only a renderer for the first two

knauss added inline comments.Oct 10 2017, 8:09 AM
plugins/messageviewer/bodypartformatter/gnupgwks/plugin.cpp
30–31

i don't get this. can you point me to the part where I see that?

31

I understand why all three are in that list.

knauss added inline comments.Oct 10 2017, 8:12 AM
plugins/messageviewer/bodypartformatter/autotests/data/wks-confirmation-request-multipart-decrypted.mbox.html
29

i know, but still it needs to be fixed :)

plugins/messageviewer/bodypartformatter/gnupgwks/gnupgwksformatter.cpp
94

i know, but still it needs to be fixed :)

vkrause added inline comments.Oct 10 2017, 6:53 PM
plugins/messageviewer/bodypartformatter/autotests/data/wks-confirmation-request-multipart-decrypted.mbox.html
29

sure, but let's address this separately then, not as part of an unrelated patch

plugins/messageviewer/bodypartformatter/gnupgwks/gnupgwksformatter.cpp
94

dito

plugins/messageviewer/bodypartformatter/gnupgwks/plugin.cpp
30–31

that's in the json file, the renderer section only has two entries, so those need to be on 0 and 1 in this enum

knauss accepted this revision.Oct 10 2017, 8:22 PM
This revision is now accepted and ready to land.Oct 10 2017, 8:22 PM
This revision was automatically updated to reflect the committed changes.