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

Authored by dcaliste on Jun 4 2019, 7:57 AM.

Description

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

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.

Reviewers: vkrause, KDE PIM, winterz

Reviewed By: KDE PIM, winterz

Subscribers: kde-pim, pvuorela

Tags: KDE PIM

Differential Revision: https://phabricator.kde.org/D21215

Details