[Kde-pim] Re: ItemFetchJob AncestorRetrieval

Christian Mollekopf chrigi_1 at fastmail.fm
Mon Mar 7 19:12:39 GMT 2011


On Monday 07 March 2011 20:02:56 Kevin Krammer wrote:
> On Monday, 2011-03-07, Christian Mollekopf wrote:
> > Hi,
> > 
> > I tried retreiving the parent collection of an item using:
> > itemFetchJob-
> > 
> > >fetchScope().setAncestorRetrieval(Akonadi::ItemFetchScope::Parent);
> > 
> > I'm doing this to figure out in which resource the item is in. So after
> > retrieving the item I tried to access the resource identifier with:
> > item.parentCollection().resource(), but that just returns an empty string
> > (the whole collection only contains the id, thats all).
> > 
> > So, where are those retrieved ancestor collections available?
> 
> I am afraid the ancestor retrieval only fetches information to correctly
> address the collections (IIRC Akonadi ID and Remote ID).
> To get any information about the collection you'll have to fetch it based
> on what item.parentCollection() returns.

I see....
Thanks again =)

> 
> Cheers,
> Kevin
_______________________________________________
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