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
=== modified file 'src/sync-configure.cpp'
--- src/sync-configure.cpp 2014-04-15 22:20:40 +0000
+++ src/sync-configure.cpp 2015-01-06 13:59:42 +0000
@@ -162,14 +162,22 @@
162 config[""]["maxlogdirs"] = "2";162 config[""]["maxlogdirs"] = "2";
163163
164 QString expectedSource;164 QString expectedSource;
165 bool isCalendar = false;
165 if (serviceName == CONTACTS_SERVICE_NAME) {166 if (serviceName == CONTACTS_SERVICE_NAME) {
166 expectedSource = QString("source/addressbook");167 expectedSource = QString("source/addressbook");
167 } else if (serviceName == CALENDAR_SERVICE_NAME) {168 } else if (serviceName == CALENDAR_SERVICE_NAME) {
169 isCalendar = true;
168 expectedSource = QString("source/calendar");170 expectedSource = QString("source/calendar");
169 } else {171 } else {
170 expectedSource = QString("source/%1").arg(serviceName);172 expectedSource = QString("source/%1").arg(serviceName);
171 }173 }
172174
175 if (isCalendar) {
176 // limit the number of retrieve events to optimize the initial query
177 // 3 months before
178 config[expectedSource]["syncInterval"] = "90";
179 }
180
173 bool result = session->saveConfig(targetName, config);181 bool result = session->saveConfig(targetName, config);
174 if (!result) {182 if (!result) {
175 qWarning() << "Fail to save account client config";183 qWarning() << "Fail to save account client config";
@@ -238,6 +246,7 @@
238246
239 config[sourceFullName]["sync"] = syncMode;247 config[sourceFullName]["sync"] = syncMode;
240248
249
241 bool result = session->saveConfig(targetName, config);250 bool result = session->saveConfig(targetName, config);
242 if (!result) {251 if (!result) {
243 qWarning() << "Fail to save account client config";252 qWarning() << "Fail to save account client config";

Subscribers

People subscribed via source and target branches