[Kde-pim] what is to do at migration if a list is empty

Kevin Krammer kevin.krammer at gmx.at
Mon Oct 3 17:48:03 BST 2011


Hi Guy,

On Saturday, 2011-10-01, Guy Maurel wrote:
> Hello!
> 
> Working on the kmail-migrator I might have found a problem.
> Have a look at the file
>   kdepimlibs/akonadi/specialcollectionshelperjobs.cpp
> at
>   DefaultResourceJobPrivate::collectionFetchResult( KJob *job )
> 
> I get a job with NO collection.
>   collections.count() is zero.
> 
> The loop
>   foreach ( const Collection &collection, collections ) {
> is not entered, so the values in the variable
>   resourceCollection
> are not defined, but at line 404 a use of it is made:
>   if ( !resourceCollection.isValid() ) {
> 
> and produce an error:
>     q->setError( Job::Unknown );
>     q->setErrorText( i18n( "Failed to fetch the resource collection." ) );
> 
> I think, it cannot be correct!
> BUT, what is to do.
> Does anybody knows this part enought, to make a proposal?

The resource might not have synchronized its collection tree yet.

Is this job the one started from tryFetchResource() or the one from 
resourceSyncResult()?

Can you check in Akonadi console whether the resource has any collections?

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/20111003/0346d53a/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