[Kde-pim] Header for calendar items in Akonadi

Kevin Krammer kevin.krammer at gmx.at
Sun Mar 2 21:25:36 GMT 2008


On Sunday 02 March 2008, Ingo Klöcker wrote:
> On Sunday 02 March 2008, Kevin Krammer wrote:

> > Attached is a potential patch set
> >
> > +      int indexOfSemicolon = mimetype.indexOf( QLatin1Char( ',' ) );
>
> This does not look like a semicolon to me.
>
> > +    int indexOfSemicolon = type.indexOf( QLatin1Char( ',' ) );
>
> Neither does this.

Oh, boy!

> > +    int indexOfSemicolon = mimetype.indexOf( QLatin1Char( ';' ) );
>
> Here you got it right. Weird. One would think you had used
> copy&paste. ;-)

In which case it would be wrong here as well :)

At least the very descriptive variable name made it easy to spot ;)

> > +      i.setMimeType( QLatin1String( "text/calendar; component=" ) +
>
> componentName );
>
> I don't really have anything to say when it comes to Akonadi, but IMHO
> this is plain evil. If we really want to go this way, then we should
> rename setMimeType to setContentType (because that's what it's called
> in RFC 2045) and use libkmime for creating and parsing those
> content-type strings. But, frankly, I don't think this is a good idea.
> Anyway, I'll leave it to Volker, Till, etc.

Right. I sounded like a good idea but the consequences are not quite pretty or 
at least if implemented this way.

Anyway, I am not committing any of this, it is meant to show how different 
approaches would look like so we get a better base for discussions.

Well, I'll probably commit the ICalFormat change since this type string will 
be needed by all approaches and Allen says its OK, but that can wait.

Cheers,
Kevin

-- 
Kevin Krammer, KDE developer, xdg-utils developer
KDE user support, developer mentoring
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kde-pim/attachments/20080302/2ea17901/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