On Tuesday, 2013-07-23, Pali Rohár wrote: > On Monday 15 July 2013 14:56:55 Pali Rohár wrote: > > Hello, > > > > I wrote akonadi plugin for contacts. But plugin does not > > working on testing machine where is akonadi and nepomuk > > installed and running. Code is here: > > > > http://quickgit.kde.org/?p=clones/trojita/pali/trojita.git&a=c > > ommit&h=b44dd6cd553dd7266198220c6bcede7facfbcf49 > > > > (it is in branch pali-gsoc-merge) > > > > Problem is that it always return empty list of contacts and I > > do not know why. I read both api pages for akonadi contacts: > > > > http://techbase.kde.org/Development/AkonadiPorting/AddressBook > > http://api.kde.org/4.x-api/kdepimlibs-> > > apidocs/akonadi/contact/html/classAkonadi_1_1ContactSearchJob. html > > > > And my code is very simlilar to above example code. But > > akonadi job still return empty list of contacts. I'm sure > > that I have contacts which match trojita search request (I > > check it in new kaddressbook and also in akonadiconsole). I > > also disabled search pattern (api say that then it returns > > all contacts) and still list of addresses is empty. > > > > So I think this is akonadi bug and not in my code. It looks > > like I'm not alone with this problem. Here are developers > > with same problem. Look at first results from google: > > > > http://comments.gmane.org/gmane.linux.debian.user.kde/26659 > > http://lists.kde.org/?l=kde-pim&m=129923342305966 > > > > And if KMail (2) which using akonadi has same code for > > autocompletion email addresses in compose new mail, then I > > bet this is reason why it not working in Kmail (on my testing > > machine). > > > > Kevin can you look at my akonadi code if it is OK? Or can > > somebody else test if akonadi plugin for trojita email > > address autocompletion working? > > Kevin, do you have any idea about this akonadi problem?
I have been away at conferences last week and hadn't had time yet to catch up, but I hope I can spend some time on this in the evening today. My guess would be that the nepomuk contact agent is either not running or did not "see" the contacts for whatever reason, thus Nepomuk not knowing about them. Instead of searching you could try loading the contacts yourself and checking their data. Similar to what your other plugin does but of course more efficient (can stop loading when it has enough matches, only needs to retrieve partial contact data, etc). Cheers, Kevin -- Kevin Krammer, KDE developer, xdg-utils developer KDE user support, developer mentoring
signature.asc
Description: This is a digitally signed message part.