New framework: KCalCore

Alexander Potashev aspotashev at gmail.com
Mon Apr 8 01:44:46 BST 2019


вс, 7 апр. 2019 г. в 17:24, Alexander Potashev <aspotashev at gmail.com>:
>
> вс, 7 апр. 2019 г. в 15:45, Volker Krause <vkrause at kde.org>:
> > Hi,
> >
> > I'd like to propose KCalCore for review to move from KDE PIM to KF5.
> >
> > KCalCore is an implementation of the iCalendar standard based on libical,
> > covering the data model, input/output and the rather complex recurrence
> > algorithms defined in that standard. It's used outside of KDE PIM as well,
> > e.g. by Zanshin or the Plasma Mobile calendar app.
>
> Hi Volker,
>
> While porting KTimeTracker to KF5, I noticed that KCalCore lost KIO
> support on the way from KDELibs4 to KF 5.0.

Another pitfall is shared pointers required everywhere. Because of
them, one can't easily subclass KCalCore classes.

Examples:
 1. KTimeTracker has a class [1] derived from
KCalCore::MemoryCalendar. In order to pass "this" into
KCalCore::FileStorage ctor, it also stores a QWeakPointer to recover
the associated shared pointer. I would love if KCalCore::FileStorage
could accept a plain pointer to KCalCore::Calendar, there is no reason
to make it shared pointer.
 2. akonadi-calendar uses the same approach [2]. Kudos to whoever
invented this clever hack
https://twitter.com/elonmusk/status/1104498091305009152


[1] https://cgit.kde.org/scratch/nalvarez/ktimetracker-filtered.git/tree/src/file/filecalendar.cpp?h=develop&id=d12569704d7b8c399151a46c067b51f2d6fbd8d1
[2] https://api.kde.org/frameworks-api/frameworks-apidocs/kdepim/akonadi-calendar/html/classAkonadi_1_1CalendarBase.html#ae3f11b166c0b51f4f071d3a74c6b91ba

-- 
Alexander Potashev



More information about the kde-pim mailing list