[Kde-pim] Akonadi EntityTreeModel Fetch Strategies and Invariants

David Narvaez david.narvaez at computer.org
Tue Nov 8 11:57:54 GMT 2011


On Tue, Nov 8, 2011 at 6:42 AM, Christian Mollekopf
<chrigi_1 at fastmail.fm> wrote:
> Hey David,
>
> akonadi_next is just some unstable stuff, which is not part of the
> official api, and therefore might change at any time and is probably not
> yet ready for consumption.
> [0] is the class you're looking for together with
> EntityMimeTypeFilterModel like this:
>
> KDescendantsProxyModel *desc = new KDescendantsProxyModel(this);
> desc->setSourceModel(entitytreemodel);
> Akonadi::EntityMimeTypeFilterModel *collectionsModel = new
> Akonadi::EntityMimeTypeFilterModel(this);
> collectionsModel->addMimeTypeExclusionFilter(
> Akonadi::Collection::mimeType() );
> collectionsModel->setSourceModel(desc);
>
> I haven't had a look at KReparentingProxyModel but the last time I look
> at it, it was far from being production ready.
> The implementation didn't handle any updates back then and simply reset
> the whole model when anything changed (which i.e. resets the selection).
> So unless Stephen fixed it, it's not yet an option.
>
> Regarding my patches: I can imagine that they're pretty outdated by now
> (once again). That's why I'm saying, Stephen has to follow this up
> eventually, and until then you're better of with the above workaround.
>
> Cheers,
> Christian
>
> [0]http://api.kde.org/4.x-api/kdelibs-apidocs/kdeui/html/classKDescendantsProxyModel.html

I was just about to post I found it at KDE UI. Thank you very much for
your quick reply!

David E. Narváez
_______________________________________________
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