[Kde-pim] Re: Bug? CollectionFetchJob doesn't always work after AgentInstanceCreateJob

David Jarvie djarvie at kde.org
Sun May 15 21:09:37 BST 2011


On Sunday 15 May 2011 20:50:06 Stephen Kelly wrote:
> David Jarvie wrote:
> > void CalendarCreator::collectionFetchResult(KJob* j)
> > {
> > kDebug() << mName;
> >     if (j->error())
> >     {
> >         kError() << "CollectionFetchJob error";
> >     }
> > }
> 
> You don't seem to access collections() from the job as I did. Could you try 
> that please?

I added that into the result() slot, but when the collectionsReceived() slot isn't  called, the result() slot returns an empty collections list, as shown by the last debug output call.

void CalendarCreator::collectionFetchResult(KJob* j)
{
kDebug() << mName;
    if (j->error())
    {
        kError() << "CollectionFetchJob error: " << mErrorMessage;
        finish(true);
        return;
    }
    CollectionFetchJob* job = static_cast<CollectionFetchJob*>(j);
    Collection::List collections = job->collections();
    kDebug() << collections.count();
}

But from what Kevin says, it looks as if it really is a timing issue.

-- 
David Jarvie.
KDE developer.
KAlarm author -- http://www.astrojar.org.uk/kalarm
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kde-pim/attachments/20110515/3c6ef680/attachment.sig>
-------------- next part --------------
_______________________________________________
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