From 10ef565f89514790ef57556386cccea261e38ec4 Mon Sep 17 00:00:00 2001 From: Matt Vogt Date: Fri, 17 Jul 2015 13:33:21 +1000 Subject: [PATCH] [libcontacts] Adjust fetch hint for non-completing address resolution. Contributes to MER#1174 When resolving an address that does not need the whole contact to be retrieved, the fetch should include any resolvable addresses of the contact, since address resolution is obviously in use in the caller application. --- src/seasidecache.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/seasidecache.cpp b/src/seasidecache.cpp index f3713f5..fb98112 100644 --- a/src/seasidecache.cpp +++ b/src/seasidecache.cpp @@ -3227,9 +3227,9 @@ void SeasideCache::resolveAddress(ResolveListener *listener, const QString &firs request->setFilter(localFilter & remoteFilter); } - // If completion is not required, we need to at least retrieve as much detail - // as the favorites store, so we don't update any favorite with a smaller data subset - request->setFetchHint(requireComplete ? basicFetchHint() : favoriteFetchHint(m_fetchTypes | m_extraFetchTypes)); + // If completion is not required, at least include the contact endpoint details (since resolving is obviously being used) + const quint32 detailFetchTypes(SeasideCache::FetchAccountUri | SeasideCache::FetchPhoneNumber | SeasideCache::FetchEmailAddress); + request->setFetchHint(requireComplete ? basicFetchHint() : onlineFetchHint(m_fetchTypes | m_extraFetchTypes | detailFetchTypes)); connect(request, SIGNAL(stateChanged(QContactAbstractRequest::State)), this, SLOT(addressRequestStateChanged(QContactAbstractRequest::State))); m_resolveAddresses[request] = data;