bodypartformatter.cpp:
- Add classes and factory code for multipart subtypes
objecttreeparser.{h,cpp}:
- Refactor common child handling (normal mp/mixed semantics w/o the
kroupware message hack) into stdChildHandling().
- Make sure the above is used as fallback in every
processMultiPartFooSubtype(), then remove it from
processMultiPartType(), so the latter has the same structure as all
the other processFooType()s had.
- Refactor processMailmanMessage() and isMailmanMessage() from
processTextPlainSubtype().
- in parseObjectTree():
o Get rid of the old switch with all the kdFatal()s in it.
o Use AttachmentStrategy::defaultDisplay()
- remove processMultiPartType()
- simplyfy some processMutliPartFooSubtype() methods by:
o using stdChildHandling()
o introducing guard clauses
svn path=/trunk/kdepim/; revision=255329
"Content-type: text"
(no subtype). In this case, subtype in BodyPartFormatter::createFor() was
empty, so createFor() returned 0, unexpectedly for objecttreeparser on a
text/* type, hitting a kdFatal().
CCMAIL: till@adam-lilienthal.de
svn path=/trunk/kdepim/; revision=252773
not trivial) to BodyPartFormatter, calling back at
ObjectTreeParser::processFooBarSubtype() methods, as for app/* and
text/* before.
o add some triple-hashed comments about suspicious code
o in ObjectTreeParser::parseObjectTree(),
- replace repeated if(node)'s with a guard clause
- replace an occurrence of
if ( a || b ) {
if ( a ) foo; else bar;
}
with (hopefully equivalent :-)
if ( a ) foo; else if ( b ) bar;
- remove unneeded temp. var curNode and s/curNode/node/g;
- use new AttachmentStrategy::defaultDisplay() to get rid of an
else-if-cascade
o kill now unused ObjectTreeParser::processFooType() methods.
o In bodypartformatter.cpp, add the new BodyPartFormatter subclasses
and prepare for a table-driven (as opposed to switch'ing factory
methods.)
svn path=/trunk/kdepim/; revision=252732
BodyPartFormatter, intended to encapsulate the various
ObjectTreeParser::processFooBarSubtype() methods in per-mimetype
fashion. Currently, text/* and app/* are available, but they just call
back the ObjectTreeParser methods, which therefore are made public
until removed later.
svn path=/trunk/kdepim/; revision=251468