Create second-type duration for 0 delay durations in ical format.
ClosedPublic

Authored by dcaliste on May 14 2019, 1:57 PM.

Details

Summary

In various portion of the code, Duration( 0 ) is used to represent a zero delay duration (see alarm.cpp for examples). This is creating a Duration::Seconds type duration. But when reading an ical format, the zero delay duration is created with Duration( 0, Days ) which makes comparison always fail for zero delay durations…

This is part of two patches that have been added to the SailfishOS fork of KCalCore.

Test Plan

The added testAlarm() function added by the patch in testicalformat.cpp is failing without the patch. This test is basically creating an alarm which triggers on time and export it to iCal format. Then the serialized data are parsed again and compared with initial alarm.

Diff Detail

Repository
R172 KCalendar Core
Lint
Lint Skipped
Unit
Unit Tests Skipped
dcaliste created this revision.May 14 2019, 1:57 PM
Restricted Application added a project: KDE PIM. · View Herald TranscriptMay 14 2019, 1:57 PM
Restricted Application added a subscriber: kde-pim. · View Herald Transcript
dcaliste requested review of this revision.May 14 2019, 1:57 PM

Looks sane to me, @winterz any objections to this?

winterz accepted this revision.Thu, May 30, 9:43 PM

should be ok.
no objections.

This revision is now accepted and ready to land.Thu, May 30, 9:43 PM
dcaliste closed this revision.Tue, Jun 4, 7:58 AM