[Kde-pim] Akonadi resource for Todo.txt: item.hasPayload() False

Kevin Krammer kevin.krammer at gmx.at
Sun Sep 4 19:12:36 BST 2011


Hi Markus,

On Sunday, 2011-09-04, Markus Becker wrote:
> Hi,
> 
> I am trying to create an Akonadi resource for Todo's according to the file
> format of http://todotxt.com/ by following the techbase tutorial. The
> Todo's are shown in Korganizer, so far so good.

Very cool!

> I have problems adding new Todo's though, which I create in Korganizer.
> Well, the itemAdded() method of the resource is called, but the Item does
> not have any payload. I have tinkered
> with
> X-Akonadi-MimeTypes=text/calendar,application/x-vnd.akonadi.calendar.todo
> in the .desktop file, but to no avail. Do I have to write a serializer?

No, you only need to tell the Resource's change recorder to get the full item 
for your when it handles the "add item" change.
See 
http://techbase.kde.org/Development/Tutorials/Akonadi/Resources#Item_Changes

Alternatively you can use an ItemFetchJob to fetch the item's payload 
explicitly using the base item you get from itemAdded the call.

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: 190 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kde-pim/attachments/20110904/b03916bc/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