GNOME Bugzilla – Bug 650950
libedata-book: entry_compare should iterate over attributes with the same name
Last modified: 2011-05-27 13:28:35 UTC
Created attachment 188446 [details] [review] Proposed patch Hi, I am working on the QtContacts backend for EDS, part of MeeGo. While testing our backend, I noticed the following problem: I have a vCard with several X-HOBBY attributes/lines. I would like to make a query to check if any of its hobbies is "Fishing". However, it is only possible query the first X-HOBBY currently. This is due to the fact that entry_compare() in e-book-backend-sexp.c calls e_vcard_get_attribute() which returns only one (the first) attribute with a given name. Please find attached a patch to extend entry_compare() to iterate over attributes that have the same name (e.g. X-HOBBY) so that it can match any of them, not just the first one in the vCard.
Looks good. Feel free to commit to gnome-3-0 and master branches.
Created commit 16ebd8f in eds master (3.1.2+)