bit hack to get multiple formateres for one type working.
ClosedPublic

Authored by knauss on Nov 23 2015, 12:25 PM.

Details

Summary

must be reworked :D

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 1350.Nov 23 2015, 12:25 PM
knauss retitled this revision from to bit hack to get multiple formateres for one type working..
knauss updated this object.
knauss edited the test plan for this revision. (Show Details)
knauss added a reviewer: vkrause.
knauss added a project: KDE PIM.

So far i can run rendertests, it only fails for the external plugin test with ns-ktnef, because i havn't updated them and i changed the interface with the process function.

messageviewer/src/interfaces/bodypartformatter.h
53

we need the MessagePart in Interface to have the process function with MessagePart as return value

71

is used to descide if we have the interface or a propper messagepart.

76

it is defined in viewer/bodyforamtter.cpp

this is really not a way to go - but it is working...

messageviewer/src/viewer/objecttreeparser.cpp
343

i cant't return sub.find(subtype), because than i have no end element, with i can test the end.

344

can this break? if i return a empty iterator?

362

need a better way to detect asIcon

vkrause added inline comments.Nov 28 2015, 8:57 AM
messageviewer/src/interfaces/bodypartformatter.h
71

Can't you use dynamic_cast for that? That would use the already existing type information rather than something string-based. To the very least, use an enum for this, not a string.

knauss updated this revision to Diff 1629.Dec 27 2015, 1:43 PM
knauss marked 2 inline comments as done.

use dynamic_cast instead of type

This revision was automatically updated to reflect the committed changes.