[Kde-pim] Problems with ContactSearchJob

Klaas Freitag freitag at kde.org
Wed May 15 15:47:35 BST 2013


On 14.05.2013 19:39, Kevin Krammer wrote:
Hi Kevin,

thanks for your answer!

>>
>> since (I believe) I switched to KDE 4.10.x, I experience problems in my
>> application Kraft [1] with the ContactSearchJob to query Contacts from
>> address books.
>>
>> A small test case of what I use in Kraft can be found in the attached
>> example app, see kta.cpp. It's a contact search job with search criteria
>> Uid (Note that to try it, you need to change the uid that is searched
>> for to something that exists in your address books). The result list for
>> me is always empty, even if the contact exists, ie. is visible in
>> akonadiconsole. With previous versions it returned one entry with the
>> contact.
>
> I take it you don't get a job error, i.e. the job "succeeds" but has no
> matches, right?
Yes, correct, the job finishes correctly but with an empty match list.

>> What has changed recently? How can that be fixed? Do I have to do more
>> initialitzations of Akonadi now? What if there are more than one address
>> books configured? Are they all searched?
>
> The code looks fine and I don't think there were any changes to that
> particular search recently. But this  (Akonadi/Nepomuk interaction) is out of
> my area of expertise, not sure how to debug this further.
It seems to be related in which address book the contacts are stored. A 
user reports that Kraft finds the contacts if they are stored in 
Personal Contacts:
"Anscheinend geht es nicht mit übernommenen oder importierten
  Konrtakten! Wenn ich einen Kontakt neu anlege im Hauptordner
  des Adressbuchs "Persönliche Kontakte", dann und zwar, so weit
  ich bisher sehen kann, nur dann, dann findet Kraft die
  Kundenkontakte."

Is there anything needed to add ALL addressbook to the search, or loop 
over all and search in each of them or so?

> You could try to modify one of the contact the sparql querys in
> Akonadiconsole's item query tab to the one for UID in
> kdepimlibs/akonadi/contact/contactsearchjob.cpp
>
> There is probably also a Nepomuk commandline interface or D-Bus interface that
> allows for Sparql queries, i.e. in order to bypass Akonadi and check if the
> search itself works.
Probably, but that technology has a steep learning curve and not soo 
much documentation around.
>
Thanks,
Klaas


>

_______________________________________________
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