[Kde-pim] KABC Contact Groups

Christian Mollekopf chrigi_1 at fastmail.fm
Wed May 15 11:42:45 BST 2013


Hey,

KABC::ContactGroup uses the akonadi item id of a contact as uid, which is IMO 
a bad design decision, because contact groups are synchronized to other 
systems where the id's are obviously not valid any more.

It's not a big problem when writing the group to a server, because we can 
simply fetch each contact and replace the id with the actual uid. It's a bit 
of a mess though when receiving distribution lists, because it's very well 
possible that the referenced contacts haven't yet arrived on the system, and 
thus also no akonadi item id is available.

The proper solution would IMO be to always use the actual UID of the contact, 
and building the hierarchy in memory, i.e. when displaying the addressbook. If 
there would indeed be a performance issue, we could still store the akonadi 
item id in some additional attribute (as cache), but using the akonadi item id 
in the payload as reference leaks an implementation detail to the storage 
layer (which becomes apparent when we try to synchronize it).

If no one objects I will look into how to fix that.

Martin: let me know if that has any implications for the kpeople/kaddressbook2 
plans

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