Skip to content
This repository has been archived by the owner on Sep 4, 2021. It is now read-only.

Commit

Permalink
[libcontacts] Remove obsolete finalizeUpdate function
Browse files Browse the repository at this point in the history
The actions previously performed in this function are now performed
by completeSynchronizeList.
  • Loading branch information
matthewvogt committed Aug 12, 2013
1 parent b01bcf6 commit a6c5183
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 20 deletions.
19 changes: 0 additions & 19 deletions src/seasidecache.cpp
Expand Up @@ -1636,24 +1636,6 @@ void SeasideCache::relationshipsAvailable()
}
}

void SeasideCache::finalizeUpdate(FilterType filter)
{
const QList<ContactIdType> queryIds = m_contactIdRequest.ids();
QVector<ContactIdType> &cacheIds = m_contacts[filter];

if (m_cacheIndex < cacheIds.count())
removeRange(filter, m_cacheIndex, cacheIds.count() - m_cacheIndex);

if (m_queryIndex < queryIds.count()) {
const int count = queryIds.count() - m_queryIndex;
if (count)
insertRange(filter, cacheIds.count(), count, queryIds, m_queryIndex);
}

m_cacheIndex = 0;
m_queryIndex = 0;
}

void SeasideCache::removeRange(
FilterType filter, int index, int count)
{
Expand Down Expand Up @@ -1841,7 +1823,6 @@ void SeasideCache::requestStateChanged(QContactAbstractRequest::State state)
} else if (m_syncFilter != FilterNone) {
// We have completed fetching this filter set
completeSynchronizeList(this, m_contacts[m_syncFilter], m_cacheIndex, m_contactIdRequest.ids(), m_queryIndex);
finalizeUpdate(m_syncFilter);

if (m_syncFilter == FilterFavorites) {
// Next, query for all contacts (including favorites)
Expand Down
1 change: 0 additions & 1 deletion src/seasidecache.h
Expand Up @@ -365,7 +365,6 @@ private slots:
bool updateContactIndexing(const QContact &oldContact, const QContact &contact, quint32 iid, const QSet<DetailTypeId> &queryDetailTypes);
void updateCache(CacheItem *item, const QContact &contact, bool partialFetch);

void finalizeUpdate(FilterType filter);
void removeRange(FilterType filter, int index, int count);
int insertRange(
FilterType filter,
Expand Down

0 comments on commit a6c5183

Please sign in to comment.