[Kde-pim] Akonadi EntityTreeModel Fetch Strategies and Invariants

David Narvaez david.narvaez at computer.org
Fri Oct 14 21:09:46 BST 2011


Hi,

First of all, happy b'day to KDE! :)

I have a question about Fetching Strategies in the Akonadi
EntityTreeModel. According to the documentation, the
InvisibleCollectionFetch "Fetches collections, but does not put them
in the model. This can be used to create a list of items in all
collections. The ParentCollectionRole can still be used to retrieve
the parent collection of an Item."[0]

Now, on the code, we disconnect collection change notifications if the
InvisibleCollectionFetch flag is set[1] which means no collection
addition or removal is notified. Later, in the code, we assume that
all Items that are to be removed from the model have a collection in
the model[2] but, since you can set the InvisibleCollectionFetch
strategy independent from the Item fetch strategy, you might as well
receive notifications of items added and removed from collections not
in the model. This causes crashes in the assertions and makes me
wonder if it's the right way to do stuff or if I should be looking at
fixing this behavior.

Am I understanding it right? Any comments or suggestions? Thanks.

David E. Narvaez

[0] http://api.kde.org/4.7-api/kdepimlibs-apidocs/akonadi/html/classAkonadi_1_1EntityTreeModel.html#aaf514b1eeffd1c08e01555cc14edb072a0797046b326fb5117173a71c51662798
[1] https://projects.kde.org/projects/kde/kdepimlibs/repository/revisions/master/entry/akonadi/entitytreemodel.cpp#L1054
[2] https://projects.kde.org/projects/kde/kdepimlibs/repository/revisions/master/entry/akonadi/entitytreemodel_p.cpp#L1033
_______________________________________________
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