I don’t want to impose my opinion on the matter. So let’s start with some general information related to calendar handling starting from the application point of view:
- you need a memory representation that is suited for QML:
- KCalendarCore is a Qt oriented representation of object described in the CalDAV RFC and its extensions. It exposes events, todos and journals as QGadgets. They are gathered in Calendar QObjects. The project has a long inheritence and is well supported by KDE, being part of their Frameworks. It is using state of the art Qt. Sailfish OS proposes it over Qt 5.6.
- QtOrganizer from QtPim is another Qt oriented representation of events and todos. It is slightly less 1:1 with CalDAV RFC objects but not far. It seems to me that QtPim is advancing slowly maybe even stalled. It is still part of the Qt project though and has been ported to Qt6. Sailfish OS offers it as a backport to Qt 5.6.
- you need a backend to store the data on disk for off-line usage:
- KDE is using Akonadi, not available on Sailfish OS.
- mKCal is an SQlite backend, available on Sailfish OS. It was part of KCal before its division into KCalCore (becoming later KCalendarCore) and mKCal. It is inheriting all the history of KCal and thus suffers from some old decisions on its API. It’s only used by Sailfish OS at the monent. It is currently not compatible with latest KCalendarCore from KDE Framework 6, but I’m working on it ; -) It is not yet ready as a backend for QtOrganizer, but it may become ready in the near future.
- you may want a synchronisation with on-line services:
- Buteo framework is doing so on Sailfish OS.
buteo-sync-plugin-caldav
is doing the job on Sailfish OS, updating any storage using an mKCal backend (well almost any, currently it’s hardcoded for the system storage, but it may be amended easily to do it on any file).
- you may need some account credentials for the on-line service:
- Single Sign On (sso) framework is handling the authentication, being password or OAuth2. In relation with
libaccounts-qt
, it allow to setup and use an account for an on-line service. It is used internally by the buteo-sync-plugin-caldav to get the necessary credentials.
Now that the technical points have been listed, let’s move to my personal opinion on the matter. The technical choices to develop a todo application depends, in my opinion, on the code you may want to reuse. If like for UBPorts case, you already have a UI that is using a framework, it’s better to stick with this framework and try to put mKCal as a backend. If you don’t have a UI ready, I would go myself for KCalendarCore as a memory representation since it’s well maintained and not too badly documented. Using mKCal as a backend as some pros, like being able to rely on the synchronisation framework, and some cons like the fact that its API is not completely future proof at the moment (but migration will be simple and I can do it via a PR once mKCal moves to support state of the art KCalendarCore). mKCal itself is not threaded and requests are synchronous. This can add some nasty lags of some hundreds of milliseconds for large requests like getting recurring todos. Sailfish OS is circumventing this with nemo-qml-plugin-calendar
which is adding a background worker to database IOs. But it is not very well suited in our case since it is event oriented. There is no todo support there. Todos could be added, but it’s a medium to large task in my opinion.
In any cases, the current status of the stack in Sailfish OS, is only dealing with system calendar. So adding todos will require some adjustments in the Buteo plugin for instance.
As an example, I worked some years ago for @ichthyosaurus todo application, to propose a draft on switching from a homemade backend to a mKCal one, see GitHub - dcaliste/harbour-todolist at mkcal It can give a quick view on how to use mKCal directly and expose it QML (here using the API of the objects developped for the application).
Too bad I cannot come to Prague, I would have been delighted to speak about Pim, calendars and todos !