[Kde-pim] Question about itemfetchscope

laurent Montel montel at kde.org
Fri Nov 6 10:00:24 GMT 2009


Hi,
In kmail I got item:


  Akonadi::ItemFetchJob *job = new Akonadi::ItemFetchJob( mTemplateFolder );
  job->fetchScope().fetchFullPayload();
  Akonadi::Item::List items;
  if ( job->exec() ) {
    items = job->items();
  }
  for ( int idx = 0; idx < items.count(); ++idx ) {
    qDebug()<<" items.at(idx).parentCollection() :"<<items.at( idx 
).parentCollection();
    KMime::Message::Ptr msg = KMail::Util::message( items.at( idx ) );
    if ( msg ) {
      ....
   }
}

it works fine it's not a pb.
But when I test parentCollection it returns invalid parent !
I don't understand.
Why after an itemfetchjob parentcollection is invalid ?

What I am missing ?

Regards

-- 
Laurent Montel | laurent at kdab.com | KDE/Qt Senior Software Engineer
Klarälvdalens Datakonsult AB, a KDAB Group company
Tel. Sweden (HQ) +46-563-540090, USA +1-866-777-KDAB(5322)
KDAB - Qt Experts - Platform-independent software solutions
_______________________________________________
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