Correct icon names for recurring to-dos

Authored by gjditchfield on Jun 9 2020, 4:57 PM.

Description

Correct icon names for recurring to-dos

Todo::iconName() compares a "recurrenceId" to the due date of the current
occurrence of the todo to decide whether the specified occurrence has been
completed.

  • To-dos do not have to have a due date. In that case the comparison fails, and "view-calendar-tasks" is always returned.
  • RFC 2445/RFC 5545 say that a recurrence ID is the start date of an occurrence, and KOrganizer's Agenda view passes start dates to iconName(). In that case iconName() incorrectly returns "task-complete" for the first occurrence of a never-completed to-do.

Comparing the recurrence ID to the start date of the current occurrence
fixes the problems.