[Kde-pim] Re: Bug? CollectionFetchJob doesn't always work after AgentInstanceCreateJob
Stephen Kelly
steveire at gmail.com
Sun May 15 20:29:34 BST 2011
David Jarvie wrote:
> When CollectionFetchJob is called to fetch the collection created by an
> AgentInstanceCreateJob, it doesn't always return any collection even
> though the result status is ok. I suspect that some sort of timing issue
> may be responsible for no collection being returned - perhaps the
> collection isn't created quite soon enough?
>
> In AgentInstanceCreateJob result slot, some configuration of the agent is
> done, followed by calling agent.reconfigure(), and then a
> CollectionFetchJob is created, with the resource to use in it being
> specified by fetchScope().setResource(agent.identifier()). There are slots
> connected to both the job's collectionsReceived() signal and its result()
> signal. Sometimes the collectionsReceived() slot is called, and sometimes
> not. The result() slot always indicates success.
>
> Looking at the resources in akonadiconsole always shows them to have been
> created successfully.
>
> So my conclusion is that there needs to be some delay before calling
> CollectionFetchJob if it is to work properly and reliably. This seems like
> a bug.
>
What does your result slot look like? Something like
void MyClass::slotResult(KJob *job)
{
if (job->error())
return;
CollectionFetchJob *colFetch = qobject_cast<CollectionFetchJob *>(job);
kDebug() << colFetch->collections().size();
}
What is the output of the debug?
_______________________________________________
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