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

David Jarvie djarvie at kde.org
Sat May 8 00:55:32 BST 2010


I'd like to add two new methods to Akonadi::EntityTreeModel, to fetch the Collection or Item corresponding to a given Id. This is something I need to do quite frequently in KAlarm, and, since this is an easy lookup in EntityTreeModel, it seems a good idea to provide simple methods to do this, rather than having to search the model for the Id and then fetch the Collection or Item via the data() method. The methods would be as follows:

Collection EntityTreeModel::collectionForId(Collection::Id id) const
{
    return d->m_collections.value(id);
}

and similarly for Items.

If this is ok in principle, I'll post a ReviewBoard item for it, and hopefully get it committed before the soft API freeze.

-- 
David Jarvie.
KDE developer.
KAlarm author -- http://www.astrojar.org.uk/kalarm
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kde-pim/attachments/20100508/440524b9/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