[Kde-pim] [Akonadi] Problem creating collection
桥 杨
yangqiao0505 at icloud.com
Thu Jul 24 11:09:03 BST 2014
I’m having some trouble when creating a new collection.If I set the parent collection to root, the CollectionCreateJob returns an error “cannot create top-level collection” . If I set the parent collection to the default calendar folder, returns an error “the collection cannot have a sub-collection”. But I can create a calendar folder manually in kontact.
What I’ve done is exactly what is written in the comments:
> // create a new top-level collection
> Akonadi::Collection collection;
> collection.setParentCollection( Collection::root() );
> collection.setName( "Events" );
> collection.setContentMimeTypes( QStringList( "text/calendar" ) );
> Akonadi::CollectionCreateJob *job = new Akonadi::CollectionCreateJob( collection );
> connect( job, SIGNAL(result(KJob*)), this, SLOT(createResult(KJob*)) );
>
Does anyone have any idea on what might cause these problems?
Thank you very much in advance.
_______________________________________________
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