Merge lp:~renatofilho/sync-monitor/fix-1339016-rtm into lp:sync-monitor/rtm-14.09

Proposed by Renato Araujo Oliveira Filho
Status: Merged
Approved by: Bill Filler
Approved revision: 33
Merged at revision: 36
Proposed branch: lp:~renatofilho/sync-monitor/fix-1339016-rtm
Merge into: lp:sync-monitor/rtm-14.09
Diff against target: 34 lines (+9/-0)
1 file modified
src/sync-configure.cpp (+9/-0)
To merge this branch: bzr merge lp:~renatofilho/sync-monitor/fix-1339016-rtm
Reviewer Review Type Date Requested Status
Ubuntu Phablet Team Pending
Review via email: mp+245656@code.launchpad.net

Commit message

Use the new "startDate" filter to limit the number of events retrieved on the first calendar sync.

To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/sync-configure.cpp'
2--- src/sync-configure.cpp 2014-04-15 22:20:40 +0000
3+++ src/sync-configure.cpp 2015-01-06 13:59:42 +0000
4@@ -162,14 +162,22 @@
5 config[""]["maxlogdirs"] = "2";
6
7 QString expectedSource;
8+ bool isCalendar = false;
9 if (serviceName == CONTACTS_SERVICE_NAME) {
10 expectedSource = QString("source/addressbook");
11 } else if (serviceName == CALENDAR_SERVICE_NAME) {
12+ isCalendar = true;
13 expectedSource = QString("source/calendar");
14 } else {
15 expectedSource = QString("source/%1").arg(serviceName);
16 }
17
18+ if (isCalendar) {
19+ // limit the number of retrieve events to optimize the initial query
20+ // 3 months before
21+ config[expectedSource]["syncInterval"] = "90";
22+ }
23+
24 bool result = session->saveConfig(targetName, config);
25 if (!result) {
26 qWarning() << "Fail to save account client config";
27@@ -238,6 +246,7 @@
28
29 config[sourceFullName]["sync"] = syncMode;
30
31+
32 bool result = session->saveConfig(targetName, config);
33 if (!result) {
34 qWarning() << "Fail to save account client config";

Subscribers

People subscribed via source and target branches