Merge lp://staging/~charlesk/indicator-datetime/lp-1456281-fix-15.04-alarm-regression into lp://staging/indicator-datetime/15.04

Proposed by Charles Kerr
Status: Merged
Approved by: Ted Gould
Approved revision: 428
Merged at revision: 414
Proposed branch: lp://staging/~charlesk/indicator-datetime/lp-1456281-fix-15.04-alarm-regression
Merge into: lp://staging/indicator-datetime/15.04
Diff against target: 1442 lines (+809/-433)
17 files modified
src/engine-eds.cpp (+348/-200)
tests/CMakeLists.txt (+15/-14)
tests/print-to.h (+10/-1)
tests/run-eds-ics-test.sh (+10/-0)
tests/test-eds-ics-all-day-events.cpp (+91/-0)
tests/test-eds-ics-all-day-events.ics (+19/-0)
tests/test-eds-ics-config-files/.config/evolution/sources/system-proxy.source (+21/-0)
tests/test-eds-ics-nonrepeating-events.cpp (+93/-0)
tests/test-eds-ics-nonrepeating-events.ics (+27/-0)
tests/test-eds-ics-repeating-events.cpp (+100/-0)
tests/test-eds-ics-repeating-events.ics (+28/-0)
tests/test-eds-ics-repeating-valarms.ics (+47/-0)
tests/test-eds-tasks-config-files/.config/evolution/sources/system-proxy.source (+0/-21)
tests/test-eds-tasks-config-files/.local/share/evolution/tasks/system/tasks.ics (+0/-28)
tests/test-eds-tasks.cpp (+0/-101)
tests/test-eds-valarms-config-files/.config/evolution/sources/system-proxy.source (+0/-21)
tests/test-eds-valarms-config-files/.local/share/evolution/calendar/system/calendar.ics (+0/-47)
To merge this branch: bzr merge lp://staging/~charlesk/indicator-datetime/lp-1456281-fix-15.04-alarm-regression
Reviewer Review Type Date Requested Status
Ted Gould (community) Approve
PS Jenkins bot (community) continuous-integration Approve
Review via email: mp+259713@code.staging.launchpad.net

Commit message

Fix regression that caused nonrepeating alarms to go off at the wrong time.

Description of the change

== Description of the Change

So, for the purposes of this description there are two kinds of ECalComponents: the primary one for an event, and instance components that are what you get when you have a repeating event.

Timezones for "floating" times (e.g., an alarm that goes off at 6:30 AM regardless of the current timezone) get distorted when you call e_cal_util_generate_alarms_for_comp() on an instance component. This caused nonrepeating alarms to go off at the wrong time. We need to build the Alarms from primary components.

So, the old code flow was

    for (instance : e_cal_client_generate_instances(client))
        for (alarm : e_cal_util_generate_alarms_for_comp(instance))

The new flow is:

    for (component : e_cal_client_get_object_list_as_comps(client))
        for (alarm : e_cal_util_generate_alarms_for_list(component))

...if only the actual code were that easy :-)

Also, ensure EDS regression tests exist for both repeating and nonrepeating alarms.

== Checklist

> Are there any related MPs required for this MP to build/function as expected? Please list.

No

> Is your branch in sync with latest trunk? (e.g. bzr pull lp:trunk -> no changes)

In sync with indicator-datetime/15.04

> Did the code build without warnings?

Yes

> Did the tests run successfully?

Yes

> Did you perform an exploratory manual test run of your code change and any related functionality?

Yes

> If you changed the packaging (debian), did you subscribe the ubuntu-unity team to this MP?

N/A

> What device (or emulator) has your component test plan been executed successfully on?

krillin ubuntu-touch/rc-proposed/bq-aquaris.en r11

> What manual tests are relevant for this MP?

indicator-datetime/disable-one-time-alarms-after-notification

> Did you include a link to the MR Review Checklist Template to make your reviewer's life easier?

https://wiki.ubuntu.com/Process/Merges/Checklists/indicator-datetime

To post a comment you must log in.
424. By Charles Kerr

remove a little more leftover code from the false starts

Revision history for this message
Ted Gould (ted) wrote :

There seems to be a small object leak, but otherwise I can only find faults in the EDS API :-)

review: Needs Fixing
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
425. By Charles Kerr

in engine-eds.cpp's get_appointments(), clear the begin_str and end_str variables as soon as we're done with them.

426. By Charles Kerr

in engine-eds.cpp's on_object_list_ready(), always mark the subtask as finished even if the dbus call failed.

427. By Charles Kerr

in run-eds-ics-test.sh, slightly cleaner ics file copying

428. By Charles Kerr

in eds-engine, add a occur-in-time-range sexp to handle events that are interesting but don't require user notification alarms

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
Ted Gould (ted) wrote :

Looks like good updates. I really like moving the deleter function into the class, makes it way more readable and easier to track the memory.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches