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

Commit

Permalink
[libcontacts] Handle dispersed initial query results correctly
Browse files Browse the repository at this point in the history
When the initial contact set is delivered in multiple events, ensure
that all results are processed.
  • Loading branch information
matthewvogt committed Dec 11, 2013
1 parent 1c8b9fa commit 50a5847
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/seasidecache.cpp
Expand Up @@ -2019,7 +2019,13 @@ void SeasideCache::contactsAvailable()
FilterType type(m_populateProgress == FetchFavorites ? FilterFavorites
: (m_populateProgress == FetchMetadata ? FilterAll
: FilterOnline));
m_contactsToAppend.insert(type, qMakePair(queryDetailTypes, contacts));
QHash<FilterType, QPair<QSet<DetailTypeId>, QList<QContact> > >::iterator it = m_contactsToAppend.find(type);
if (it != m_contactsToAppend.end()) {
// All populate queries have the same detail types, so we can append this list to the existing one
it.value().second.append(contacts);
} else {
m_contactsToAppend.insert(type, qMakePair(queryDetailTypes, contacts));
}
} else {
if (m_activeResolve) {
// Process these results immediately
Expand Down

0 comments on commit 50a5847

Please sign in to comment.