[Kde-pim] Review Request: Convert IMAP flags to internal Akonadi flags in the IMAP resource.

Kevin Ottens ervin at kde.org
Tue Jul 27 08:22:03 BST 2010


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://reviewboard.kde.org/r/4760/#review6713
-----------------------------------------------------------


Disclaimer: OK, I'm not giving my "Ship It" yet, I'll be the one spoiling the party, sorry guys. ;-)

After further discussion with Volker regarding this patch I understand better this patch (I misread some of the context given), but we also came to the conclusion that it would be much better for those flags to not be hardcoded but have well known constants. In the same way that we have an Akonadi::MessagePart in akonadi/kmime, it would be nice to have an Akonadi::MessageFlag in akonadi/kmime as well, and use that in your patch.

The following comments on your patch will actually assume such an Akonadi::MessageFlag exists.


/branches/KDE/4.5/kdepim/runtime/resources/imap/imapresource.cpp
<http://reviewboard.kde.org/r/4760/#comment6497>

    This call to "fromAkonadiFlags()" seems useless to me as you're passing a flag which is an IMAP one, to a KIMAP job.



/branches/KDE/4.5/kdepim/runtime/resources/imap/imapresource.cpp
<http://reviewboard.kde.org/r/4760/#comment6498>

    Same than above, this fromAkonadiFlags call is useless



/branches/KDE/4.5/kdepim/runtime/resources/imap/imapresource.cpp
<http://reviewboard.kde.org/r/4760/#comment6499>

    Ditto.



/branches/KDE/4.5/kdepim/runtime/resources/imap/imapresource.cpp
<http://reviewboard.kde.org/r/4760/#comment6500>

    In this method use Akonadi::MessageFlag constants. Bonus points for making internal ImapMessageFlag constants as well and using them. ;-)



/branches/KDE/4.5/kdepim/runtime/resources/imap/imapresource.cpp
<http://reviewboard.kde.org/r/4760/#comment6501>

    Ditto.


- Kevin


On 2010-07-26 17:53:17, Leo Franchi wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://reviewboard.kde.org/r/4760/
> -----------------------------------------------------------
> 
> (Updated 2010-07-26 17:53:17)
> 
> 
> Review request for KDE PIM and Kevin Ottens.
> 
> 
> Summary
> -------
> 
> As a result of the recent Akonadi server changes that have made the akonadi server case-sensitive for flags, the decision was made to store flags as all-uppercase. However, the flags from imap servers are not upper-cased, they are simply capitalized. This results in collection statistics always being incorrect (listing all items as unread).
> 
> After discussion with Tobias, a solution was proposed to do a mapping of KImap flags <--> Akonadi flags in the imap resource, as that is the interface between KImap and Akonadi. For now this just includes 4 standard imap server flags. I don't know if this is the best way to do this, but figured i'd throw it out there and start a discussion.
> 
>  Comments are appreciated :)
> 
> 
> Diffs
> -----
> 
>   /branches/KDE/4.5/kdepim/runtime/resources/imap/imapresource.h 1154848 
>   /branches/KDE/4.5/kdepim/runtime/resources/imap/imapresource.cpp 1154848 
> 
> Diff: http://reviewboard.kde.org/r/4760/diff
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Leo
> 
>

_______________________________________________
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