Add metadata properties to calendar
AbandonedPublic

Authored by nicolasfella on Apr 14 2020, 4:58 PM.

Details

Reviewers
vkrause
winterz
Group Reviewers
Frameworks
KDE PIM
Summary

Split out from D24443.

Adds meta information for display by applications that show the calendar.

Ideally we'd use QIcon for the icon instead of an iconname string, but that would require linking against QtGui.

Test Plan

builds

Diff Detail

Repository
R172 KCalendar Core
Branch
props
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 25246
Build 25264: arc lint + arc unit
nicolasfella created this revision.Apr 14 2020, 4:58 PM
Restricted Application added a project: KDE PIM. · View Herald TranscriptApr 14 2020, 4:58 PM
Restricted Application added a subscriber: kde-pim. · View Herald Transcript
nicolasfella requested review of this revision.Apr 14 2020, 4:58 PM

looks good.
nice touch using Q_EMIT.

src/calendar_p.h
81

CalendarType mType = ReadWrite ?

  • default to ReadWrite
  • rename icon to iconname to reflect that it's just the name
nicolasfella marked an inline comment as done.Apr 14 2020, 6:56 PM
winterz accepted this revision.Apr 14 2020, 6:57 PM
This revision is now accepted and ready to land.Apr 14 2020, 6:57 PM

I don't know how things are done in frameworks but it seems to me that the KF5_VERSION (see top of kcalendarcore/CMakeLists.txt) needs to become 5.70.0 now

I don't know how things are done in frameworks but it seems to me that the KF5_VERSION (see top of kcalendarcore/CMakeLists.txt) needs to become 5.70.0 now

This is handled automatically, no need to change this.

src/calendar.h
101

As already noted in the previous review, "type" isn't the best naming for something that is about access control/permission IMHO.

A possible alternative name could be something like "AccessMode", or maybe even just bool isReadOnly.