[Kde-pim] Contacts, Groups, Akonadi and Nepomuk

Dan Vratil dan at progdan.cz
Sat Feb 18 17:18:00 GMT 2012


On Saturday 18 of February 2012 15:55:19 Kevin Krammer wrote:
> Hi,
> 
> sorry for not replying earlier, I have just returned from a business trip.

Hi, 

no problem :)

> 
> On Sunday, 2012-02-12, Dan Vratil wrote:
> > On Saturday 11 of February 2012 16:41:33 Kevin Krammer wrote:
> > > On Saturday, 2012-02-11, Dan Vratil wrote:
> > > > Hello,
> > > > 
> > > > I 'd like to bring full support for contact groups to the Google
> > > > Contacts resource. The problem is, that a single contact on Google can
> > > > be listed in multiple groups, but Akonadi does not seem to support
> > > > storing single instance of Akonadi::Item in multiple collections
> > > > without duplication.
> > > 
> > > See Akonadi::LinkJob and/or KABC::ContactGroup
> > 
> > Thanks, the Linkjob is exactly what I needed. I've run to some trouble
> > using it though.
> > 
> > I have the root collection properly synchronized (that works as expected)
> > and then I have a subcollection. When retrieveItems() is called for this
> > subcollection, I fetch all items from the main collection, check their
> > groups membership and then I call LinkJob to link some of the items from
> > main collection with the subcollection. This works for the first time - I
> > can see the linked items in the subcollection (and they are properly
> > linked in Akonadi database), but when I restart KAddressBook, the linked
> > items will not appear in the subcollection, no matter what I do.
> 
> Weird, restarting a client like KAddressBook should not change data in
> Akonadi.
> Can you check if the shutdown or the restart of KAddressBook makes the
> linked items vanish from the collection?

The items are still linked in Akonadi database, I can see them all in 
collectionpimitemrelation table. They are just not fetched by the model.

I suspect that the problem is, that the collections are not virtual. From 
reading documentation and going through other resources I got the impression  
that linked items are accepted by virtual collections only. I haven't tested 
it though, because the Collection::isVirtual() method is hardcoded for the 
search and nepomuktag resources only.

> 
> > Any idea what I could be missing?
> 
> No idea, sorry. Haven't used linking myself yet, just remembered that there
> was a job for that purpose.
> 
> Cheers,
> Kevin
> 
> 
> --
> Kevin Krammer, KDE developer, xdg-utils developer
> KDE user support, developer mentoring

-- 
Dan Vratil
www.progdan.cz | dan at progdan.cz | Jabber: progdan at jabber.cz
Fingerprint: 76C9 2F08 5D0D 6F9E 5AD4 2BFD 3A85 0307 F506 5B61
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 490 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kde-pim/attachments/20120218/30f3373b/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