summaryrefslogtreecommitdiff
path: root/libopie2/opiepim/backend/ocontactaccessbackend_sql.cpp
Side-by-side diff
Diffstat (limited to 'libopie2/opiepim/backend/ocontactaccessbackend_sql.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--libopie2/opiepim/backend/ocontactaccessbackend_sql.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/libopie2/opiepim/backend/ocontactaccessbackend_sql.cpp b/libopie2/opiepim/backend/ocontactaccessbackend_sql.cpp
index abfd944..221e977 100644
--- a/libopie2/opiepim/backend/ocontactaccessbackend_sql.cpp
+++ b/libopie2/opiepim/backend/ocontactaccessbackend_sql.cpp
@@ -843,4 +843,5 @@ OPimContact OPimContactAccessBackend_SQL::requestContactsAndCache( int uid, cons
// by using the cache..
QArray<int> cachelist = uidlist;
+ OPimContact retContact;
odebug << "Reqest and cache" << cachelist.size() << "elements !" << oendl;
@@ -866,4 +867,6 @@ OPimContact OPimContactAccessBackend_SQL::requestContactsAndCache( int uid, cons
odebug << "Caching uid: " << contact.uid() << oendl;
cache( contact );
+ if ( contact.uid() == uid )
+ retContact = contact;
resItem = res_noncustom.next();
} while ( ! res_noncustom.atEnd() ); //atEnd() is true if we are past(!) the list !!
@@ -875,5 +878,5 @@ OPimContact OPimContactAccessBackend_SQL::requestContactsAndCache( int uid, cons
<< " ms, mapping: " << t3needed << " ms" << oendl;
- return cacheFind( uid );
+ return retContact;
}