[Kde-pim] New methods for Akonadi::EntityTreeModel

Stephen Kelly steveire at gmail.com
Sat May 8 19:11:06 BST 2010


David Jarvie wrote:
>> http://api.kde.org/4.x-api/kdepimlibs-
>> 
apidocs/akonadi/html/classAkonadi_1_1EntityTreeModel.html#a5a06470b25432e5cfd953843f7968810
>> 
>> Does that work for you?
> 
> I see that you are constructing a Collection with the known ID, and then
> using modelIndexForCollection() to find the Collection with that index in
> the model. I wouldn't have thought that that would work, on my assumption
> that a Collection contains more than just the ID. 

Indeed it does, but as the id uniquely identifies the Collection, if you 
know that the etm contains the "full" collection (including as Kevin says, 
the content mimetypes, name, attributes etc), a collection can be used as a 
container for the id too retrieve the full collection with the same id. 
That's used in a few places in the API already such as all the jobs.

I'll see if I can document this better for those methods at least.

Steve.

_______________________________________________
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