Changeset View
Changeset View
Standalone View
Standalone View
src/server/collectionscheduler.cpp
Show First 20 Lines • Show All 295 Lines • ▼ Show 20 Line(s) | 287 | { | |||
---|---|---|---|---|---|
296 | // about anything else | 296 | // about anything else | ||
297 | SelectQueryBuilder<Collection> qb; | 297 | SelectQueryBuilder<Collection> qb; | ||
298 | Query::Condition orCondition(Query::Or); | 298 | Query::Condition orCondition(Query::Or); | ||
299 | orCondition.addValueCondition(Collection::syncPrefFullColumnName(), Query::Equals, (int)Akonadi::Tristate::True); | 299 | orCondition.addValueCondition(Collection::syncPrefFullColumnName(), Query::Equals, (int)Akonadi::Tristate::True); | ||
300 | Query::Condition andCondition(Query::And); | 300 | Query::Condition andCondition(Query::And); | ||
301 | andCondition.addValueCondition(Collection::syncPrefFullColumnName(), Query::Equals, (int)Akonadi::Tristate::Undefined); | 301 | andCondition.addValueCondition(Collection::syncPrefFullColumnName(), Query::Equals, (int)Akonadi::Tristate::Undefined); | ||
302 | andCondition.addValueCondition(Collection::enabledFullColumnName(), Query::Equals, true); | 302 | andCondition.addValueCondition(Collection::enabledFullColumnName(), Query::Equals, true); | ||
303 | orCondition.addCondition(andCondition); | 303 | orCondition.addCondition(andCondition); | ||
304 | orCondition.addValueCondition(Collection::referencedFullColumnName(), Query::Equals, true); | | |||
305 | qb.addCondition(orCondition); | 304 | qb.addCondition(orCondition); | ||
306 | if (!qb.exec()) { | 305 | if (!qb.exec()) { | ||
307 | qCWarning(AKONADISERVER_LOG) << "Failed to query initial collections for scheduler!"; | 306 | qCWarning(AKONADISERVER_LOG) << "Failed to query initial collections for scheduler!"; | ||
308 | qCWarning(AKONADISERVER_LOG) << "Not a fatal error, no collections will be scheduled for sync or cache expiration!"; | 307 | qCWarning(AKONADISERVER_LOG) << "Not a fatal error, no collections will be scheduled for sync or cache expiration!"; | ||
309 | } | 308 | } | ||
310 | 309 | | |||
311 | const Collection::List collections = qb.result(); | 310 | const Collection::List collections = qb.result(); | ||
312 | for (const Collection &collection : collections) { | 311 | for (const Collection &collection : collections) { | ||
Show All 28 Lines |