Skip to content

Make calendar priting work with any KCalendarCore::Calendar

Daniel Vrátil requested to merge work/dvratil/calprinter-without-akonadi into master

The printing code depends on ETMCalendar only because the ETMCalendar precalculates map of related Todos when their are inserted into the Calendar and exposes them through an API. The printing code makes use of this feature to print related Todos.

With this change the printing code uses the generic KCalendarCore::Calendar and to preserve the functionality, it simply iterates through all incidences in the calendar and tries to find any Todo related to the current Todo. While less efficient, it only happens when printing a calendar (no-body does that) and one would have to have a really huge calendar to notice any big delay. Additonally, we can upstream the functionality of retrieving related Todos into KCalendarCore::Calendar itself, since that feature does not depend on Akonadi at all.

Merge request reports