[Kde-pim] Review Request: avoid the use of an undefined collection

Kevin Krammer kevin.krammer at gmx.at
Mon Oct 10 18:55:07 BST 2011


Hi Guy,

On Monday, 2011-10-10, Guy Maurel wrote:
> Hello Kevin!
> 
> On Sunday, October 09, 2011 06:16:42 PM Kevin Krammer wrote:
> > Hi Guy,
> > 
> > I looked at it before doing my research (see my other mail from today).
> > As far as I can tell it is making the job result in success without
> > setting the resource roo/toplevel collection.
> 
> I found another part of code, which is still a mystery for me, I'll
> explain: kdepimlibs/akonadi/specialcollectionshelperjobs.cpp
> at the method:
>   DefaultResourceJobPrivate::tryFetchResource()
> 
> at line 265:
>     CollectionFetchJob *fetchJob = new CollectionFetchJob(
> Collection::root(), CollectionFetchJob::Recursive, q );
> fetchJob->fetchScope().setResource( resourceId );
>     fetchJob->fetchScope().setIncludeStatistics( true );
>     q->connect( fetchJob, SIGNAL(result(KJob*)), q,
> SLOT(collectionFetchResult(KJob*)) );
> 
> the variable "fetchJob" is declared and get a new value, but after the
> "connect" I find only the end of the method. Doesn't it need any "start"
> job?
> How does it works?

Akonadi Jobs, i.e. classes deriving from Akonadi::Job or one of its 
subclasses, start automatically (basically a delayed call to start() using Qt 
event loop).

Cheers,
Kevin
-- 
Kevin Krammer, KDE developer, xdg-utils developer
KDE user support, developer mentoring
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 190 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kde-pim/attachments/20111010/280a782b/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