[Kde-pim] fixing missing mail flags in Akonadi

Martin Koller kollix at aon.at
Tue Jan 20 05:25:57 GMT 2015


Hi,

I found that some of my mails do not have some mail flags set, e.g. "hasAttachment" or "isEncrypted".

Checking the reason for this I found the bugs in kdepim code, where simply the setting
of these flags in the Akonadi::Item is missing, e.g.

mbox resource
kmailcvt importer

As the block of code in all the needed places is the same, I'd like to create a central
function which effectively sets all needed flags from a KMime::Message into an Akonadi::Item,
something like

void transferMessageFlags(KMime::Message &from, Akonadi::Item &to)
{
  if ( KMime::hasAttachment(&from) )
      to.setFlag(Akonadi::MessageFlags::HasAttachment);
...
}

I was thinking to create this function in the Akonadi::MessageFlags namespace
(in messageflags.h)

Would this be the best place to put this function to ?

-- 
Best regards/Schöne Grüße

Martin
A: Because it breaks the logical sequence of discussion
Q: Why is top posting bad?

()  ascii ribbon campaign - against html e-mail 
/\                        - against proprietary attachments

Geschenkideen, Accessoires, Seifen, Kulinarisches: www.lillehus.at
_______________________________________________
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