[Kde-pim] Re: ItemFetchJob AncestorRetrieval

Volker Krause vkrause at kde.org
Sat Mar 12 08:31:43 GMT 2011


On Monday 07 March 2011 16:52:00 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).

if resource() is all you want to call on the parent, then you don't need that 
at all, resource() returns the same for all collections of the same resource, 
no matter where they are in the hierarchy.

regards
Volker
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 190 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kde-pim/attachments/20110312/4f34a109/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