[Kde-pim] Re: Bug in KMime with ContentType::category() and Content::attachments()

Ingo Klöcker kloecker at kde.org
Sun Apr 3 11:04:40 BST 2011


On Sunday 03 April 2011, Thomas McGuire wrote:
> Hi Gregory,
> 
> On Wednesday, March 09, 2011 04:08:34 PM Gregory Schlomoff wrote:
> > [..]
> > So, I would like to suggest the following:
> > 
> > 1. Mark CCalternativePart and CCmixedPart as deprecated, document
> > the fact that they are not being used, and remove them in KDE5
> > 2. In kmime_content.cpp, use isSubtype("alternative") ) to determine
> > whether a part is alternative or not (which is how the
> > CCalternativePart value was set)
> > 
> > What do you think ?
> 
> I am fine with the proposed changes, if you absolutley sure they are
> not used outside of KMime itself.
> Another option would be to leave category() alone and use a new
> bitmask somewhere that can have multiple values, e.g. container
> _and_ alternative part.
> 
> I have no particular preference for either.

Using a bitmask together with enums is preferable over using string 
literals because it does effectively prevent bugs caused by typos. A 
compromise which would allow for generic subtypes without having to 
clutter the API with overloads for enums and strings would be using 
named string constants.


Regards,
Ingo
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kde-pim/attachments/20110403/f7d07968/attachment.sig>
-------------- next part --------------
_______________________________________________
KDE PIM mailing list kde-pim at kde.org
https://mail.kde.org/mailman/listinfo/kde-pim
KDE PIM home page at http://pim.kde.org/


More information about the kde-pim mailing list