[Kde-pim] [Akonadi] Problem creating collection

Daniel Vrátil dvratil at redhat.com
Thu Jul 24 12:23:59 BST 2014


On Thursday 24 of July 2014 18:09:03 桥 杨 wrote:
> 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?

Hi,

I guess you are trying to create the collections from the KDEConnect daemon? 

The KDEConnect daemon can only ask Akonadi to start a new 
"akonadi_kdeconnect_resource" (or whatever you call it) and tell the deamon 
which device it should interface with.

Then it's up to the akonadi_kdeconnect_resource to talk to the device and get 
the calendars and events and put them to Akonadi.

Daniel

> 
> 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/

-- 
Daniel Vrátil | dvratil at redhat.com | dvratil on #kde-devel, #kontact, #akonadi
KDE Desktop Team
Associate Software Engineer, Red Hat

GPG Key: 0xC59D614F6F4AE348
Fingerprint: 4EC1 86E3 C54E 0B39 5FDD B5FB C59D 614F 6F4A E348
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 473 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kde-pim/attachments/20140724/dadf564c/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