How to use Akonadi::ETMCalendar?

Carl Schwan carl at carlschwan.eu
Wed Feb 17 13:27:29 GMT 2021


Le mercredi, février 17, 2021 1:23 PM, Carl Schwan <carl at carlschwan.eu> a écrit :

> Hello all,
> I'm trying to figure out if using Akonadi and the PIM libraries is viable
> for usage in Plasma Mobile. As a sort of proof of concept, I'm trying to
> build a simple calendar application using QML and Kirigami. For the moment,
> I got a simple month view working using a simple KCoreCalendar::MemoryCalendar
> loaded from a vcal file. I'm not trying to get the same QML components to
> load a calendar from an Akonadi::ETMCalendar. This turnout to be more complicated.
>
> My code is compiling but no events are displayed. calendar->events() give me
> an empty vector. I tried to look into Korganize source code but I'm not sure
> what I need to change. I guess it has something to do with the checkableProxyModel
> but after using a KViewStateMaintainerAkonadi::ETMViewStateSaver to save the
> checked state, it doesn't work.
>
> Could someone take a look at my code and help me figure out what is wrong?
> The code is here: https://invent.kde.org/carlschwan/kalendar. Warning it's not
> pretty since my first goal is to see if loading/saving calendars from Akonadi
> could work :p

So, I restarted my computer and launched my application again and now some events
are displayed \o/. There are a few more events displayed as they should (compared
to KOrganize) but this is something I can probably figure out alone :)

Sorry for the noise.

>
> Regards,
> Carl Schwan
> https://carlschwan.eu




More information about the kde-pim mailing list