[Kde-pim] Address Query with ContactSearchJob in KDE 4.13.0

Klaas Freitag freitag at kde.org
Mon Apr 28 11:03:57 BST 2014


On 28.04.2014 09:17, Daniel Vrátil wrote:

Hi,

thanks Dan for your reply. I'll try that.

> If you only want to search by UID, you can use GID fetch. GID is identifier of 
> content of the item (UID for vCards, UID for iCals, Message-Id for emails, 
> etc), which is stored directly in Akonadi.
> 
> You can use regular ItemFetchJob to fetch items by GID:
> 
> Item item;
> item.setGid("Kp9LZPRW8P");
> ItemFetchJob *fetch = new ItemFetchJob(item, this);
> ...
> ...
> 
> Since GID is not guaranteed to be unique, you might want to use 
> fetch->setCollection() to specify from which collection to fetch (it also 
> speeds up the lookup a lot) if you work only with one collection.

Hmm, I'd like to search through all address books. Is there a way to
express that as Collection?

You said that the is not guaranteed to be unique. Does that mean that
there could be two contacts with the same GID, or that there could be an
email and a contact with the same GID?

And, this solution is backward compatible, ie. works with previous KDE
versions as well, right?

Thanks,

Klaas


> 
> Dan
> 
>>
>> I'd appreciate any hints on how this problem could be solved, for me to
>> improve Kraft and for Kraft's users who are often non tech people who
>> get into trouble if they update to a more recent KDE version and see
>> this breaking, as they fear to be not longer able to send out invoices.
>> That is a uncomfortable situation for them which makes them quickly
>> running away ;-)
>>
>> If that is a problem like "baloo does not have this functionality yet"
>> its fine but than I would like to inform Krafts user to _not_ update yet.
>>
>> Thanks for your help & and the great improvements recently,
>>

_______________________________________________
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