Skip to content

Rework EventViews to support per-collection calendars

Daniel Vrátil requested to merge work/dvratil/t6460 into master

This change reworks all event views to support displaying incidences from multiple calendar instances (CollectionCalendars, based on KCalendarCore::Calendar), specifically having one calendar per Akonadi Collection. The previous approach of merging contents of all calendar-like Akonadi Collections into a single huge KCalendarCore::Calendar (via ETMCalendar) was causing a long-outstanding issue when if the same incidence with the same UID was present in multiple Collections, only one (rather random) instance would appear in the ETMCalendar.

This approach is also semantically more correct, since if a single Akonadi Collection represents a single user's calendar, than it should be mapped into a single KCalendarCore::Calendar.

If there's interest, this change paves the way for future enhancements, including making EventViews Akonadi-agnostic and thus better reusable.

Note that this change breaks API in an incompatible way, since supporting both single ETMCalendar and multiple per-collection calendars as alternative data sources would make the code needlessly complicated. From a quick check, the EventViews library is currently only used in KOrganizer.

BUG: 426248

Edited by Daniel Vrátil

Merge request reports