Skip to content
This repository has been archived by the owner. It is now read-only.
Permalink
Browse files
[libcontacts] Update the synchronizeList function
Also restore pre-fetching of favorite contact details.
  • Loading branch information
matthewvogt committed Jul 18, 2013
1 parent e702826 commit ff44b52d8dcd6c63bfe82f9f25dc86a5ba39feee
Showing with 152 additions and 187 deletions.
  1. +13 −3 src/seasidecache.cpp
  2. +137 −164 src/synchronizelists.h
  3. +2 −20 tests/tst_synchronizelists/tst_synchronizelists.cpp
@@ -1384,6 +1384,15 @@ void SeasideCache::requestStateChanged(QContactAbstractRequest::State state)
cacheItem->itemData->mergeCandidatesFetched(candidateIds);
}
}
else if (m_fetchFilter != FilterNone) {
// We have completed fetching this filter set
completeSynchronizeList(
this,
m_contacts[m_fetchFilter],
m_cacheIndex,
m_contactIdRequest.ids(),
m_queryIndex);
}
} else if (request == &m_relationshipSaveRequest || request == &m_relationshipRemoveRequest) {
QSet<ContactIdType> contactIds;
foreach (const QContactRelationship &relationship, m_relationshipSaveRequest.relationships() +
@@ -1614,9 +1623,10 @@ void SeasideCache::keepPopulated()
if (!m_keepPopulated) {
m_keepPopulated = true;

// Start a query to fully populate the cache
m_refreshRequired = true;
requestUpdate();
// Start a query to fully populate the cache, starting with favorites
m_fetchFilter = FilterFavorites;
m_fetchRequest.setFilter(QContactFavorite::match());
m_fetchRequest.start();
}
}

0 comments on commit ff44b52

Please sign in to comment.