Merge lp:~renatofilho/qtorganizer5-eds/fix-1362781-rtm into lp:qtorganizer5-eds/rtm-14.09

Proposed by Renato Araujo Oliveira Filho
Status: Needs review
Proposed branch: lp:~renatofilho/qtorganizer5-eds/fix-1362781-rtm
Merge into: lp:qtorganizer5-eds/rtm-14.09
Diff against target: 41 lines (+14/-5)
2 files modified
organizer/qorganizer-eds-engine.cpp (+13/-4)
tests/unittest/recurrence-test.cpp (+1/-1)
To merge this branch: bzr merge lp:~renatofilho/qtorganizer5-eds/fix-1362781-rtm
Reviewer Review Type Date Requested Status
Ubuntu Phablet Team Pending
Review via email: mp+245657@code.launchpad.net

Commit message

Fixed recurrence rule limit date.

To post a comment you must log in.
Revision history for this message
Renato Araujo Oliveira Filho (renatofilho) wrote :

Are there any related MPs required for this MP to build/function as expected? NO

Is your branch in sync with latest trunk? YES

Did you perform an exploratory manual test run of your code change and any related functionality on device or emulator? YES

Did you successfully run all tests found in your component's Test Plan on device or emulator? YES

If you changed the UI, was the change specified/approved by design? NO UI CHANGE

If you changed UI labels, did you update the pot file? NO LABEL

If you changed the packaging (debian), did you add a core-dev as a reviewer to this MP? NO PACKAGE CHANGED

Unmerged revisions

68. By Renato Araujo Oliveira Filho

Fixed recurrence rule limit date.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'organizer/qorganizer-eds-engine.cpp'
2--- organizer/qorganizer-eds-engine.cpp 2014-10-09 03:39:33 +0000
3+++ organizer/qorganizer-eds-engine.cpp 2015-01-06 14:05:12 +0000
4@@ -1999,11 +1999,20 @@
5 break;
6 }
7
8- if (qRule.limitDate().isValid()) {
9- rule->until = icaltime_from_timet(QDateTime(qRule.limitDate()).toTime_t(), TRUE);
10+ switch (qRule.limitType()) {
11+ case QOrganizerRecurrenceRule::DateLimit:
12+ if (qRule.limitDate().isValid()) {
13+ rule->until = icaltime_from_timet(QDateTime(qRule.limitDate()).toTime_t(), TRUE);
14+ }
15+ break;
16+ case QOrganizerRecurrenceRule::CountLimit:
17+ if (qRule.limitCount() > 0) {
18+ rule->count = qRule.limitCount();
19+ }
20+ break;
21+ case QOrganizerRecurrenceRule::NoLimit:
22+ default:
23 rule->count = ICAL_RECURRENCE_ARRAY_MAX;
24- } else if (qRule.limitCount() > 0) {
25- rule->count = qRule.limitCount();
26 }
27
28 QSet<int> positions = qRule.positions();
29
30=== modified file 'tests/unittest/recurrence-test.cpp'
31--- tests/unittest/recurrence-test.cpp 2014-10-06 18:07:08 +0000
32+++ tests/unittest/recurrence-test.cpp 2015-01-06 14:05:12 +0000
33@@ -171,7 +171,7 @@
34 filter.setCollectionId(m_collection.id());
35 items = m_engine->items(filter,
36 QDateTime(QDate(2013, 11, 30), QTime(0,0,0)),
37- QDateTime(QDate(2014, 1, 1), QTime(0,0,0)),
38+ QDateTime(QDate(2015, 1, 1), QTime(0,0,0)),
39 100,
40 sort,
41 hint,

Subscribers

People subscribed via source and target branches