[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-pim
Subject: [Kde-pim] Akonadi::ContactSearchJob
From: Klaas Freitag <freitag () kde ! org>
Date: 2011-03-04 10:10:52
Message-ID: 201103041110.52965.freitag () kde ! org
[Download RAW message or body]
Hi,
I am trying to get Krafts Addressbook integration to work again and
experience problems with Akonadi::ContactSearchJob. The returned
list is always empty. Akonadi is running fine according to akonadiconsole,
an addressbook and a nepomuk contact feeder is there and ready, I can
browse the addresses in the akonadiconsole. Kaddressbook works fine, no
akonadi-related errors are shown in kraft's application output.
This is the code I am basically using:
===
void AddressProvider::getAddressee( const QString& uid )
{
Akonadi::ContactSearchJob *job = new Akonadi::ContactSearchJob();
job->setLimit( 100 );
job->setQuery( Akonadi::ContactSearchJob::ContactUid , uid );
connect( job, SIGNAL(result(KJob*)), this, SLOT(searchResult(KJob* )));
}
void AddressProvider::searchResult( KJob* job )
{
Akonadi::ContactSearchJob *searchJob =
qobject_cast<Akonadi::ContactSearchJob*>( job );
if( searchJob->error() ) {
kDebug() << "Address search job failed: " << job->errorString();
return;
}
const KABC::Addressee::List contacts = searchJob->contacts();
if( contacts.size() > 0 ) {
emit addresseeFound( contacts[0] );
} else {
kDebug() << "Akonadi search result list has size of 0";
}
}
====
copied more or less from the api docs.
The result is "Akonadi search result list has size of 0" all the
time, regardless of what is queried for, even if I search for email which
is existing.
Any help is appreciated, I am stuck. Is that still supposed to work? How
would I debug it?
Thanks,
Klaas
KDE Version is 4.6.00 on openSUSE 11.3 with these package versions:
freitag@trixa:~/kde/kraft/src> rpm -qa | grep akonadi
akonadi-runtime-1.4.95-79.2.x86_64
libakonadi4-4.6.0-201.1.x86_64
libakonadiprotocolinternals1-1.4.95-79.2.x86_64
libakonadiprotocolinternals-devel-1.4.95-79.2.x86_64
_______________________________________________
KDE PIM mailing list kde-pim@kde.org
https://mail.kde.org/mailman/listinfo/kde-pim
KDE PIM home page at http://pim.kde.org/
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic