summaryrefslogtreecommitdiff
path: root/libopie2
Unidiff
Diffstat (limited to 'libopie2') (more/less context) (ignore whitespace changes)
-rw-r--r--libopie2/opiepim/backend/ocontactaccessbackend_sql.cpp20
1 files changed, 11 insertions, 9 deletions
diff --git a/libopie2/opiepim/backend/ocontactaccessbackend_sql.cpp b/libopie2/opiepim/backend/ocontactaccessbackend_sql.cpp
index 221e977..3d284f7 100644
--- a/libopie2/opiepim/backend/ocontactaccessbackend_sql.cpp
+++ b/libopie2/opiepim/backend/ocontactaccessbackend_sql.cpp
@@ -306,5 +306,5 @@ namespace {
306 return multi(); 306 return multi();
307 } 307 }
308 308
309 QString FindQuery::multi()const { 309 QString FindQuery::multi()const {
310 QString qu = "select * from addressbook where"; 310 QString qu = "select * from addressbook where";
@@ -321,5 +321,5 @@ namespace {
321 QString qu = "select *"; 321 QString qu = "select *";
322 qu += " from addressbook where uid = " + QString::number(m_uid); 322 qu += " from addressbook where uid = " + QString::number(m_uid);
323 323
324 // owarn << "find query: " << qu << "" << oendl; 324 // owarn << "find query: " << qu << "" << oendl;
325 return qu; 325 return qu;
@@ -493,8 +493,8 @@ OPimContact OPimContactAccessBackend_SQL::find( int uid, const QArray<int>& quer
493 QTime t; 493 QTime t;
494 t.start(); 494 t.start();
495 495
496 uint numReadAhead = readAhead(); 496 uint numReadAhead = readAhead();
497 QArray<int> searchList( numReadAhead ); 497 QArray<int> searchList( numReadAhead );
498 498
499 uint size =0; 499 uint size =0;
500 500
@@ -625,4 +625,6 @@ QArray<int> OPimContactAccessBackend_SQL::queryByExample ( const OPimContact &qu
625 } 625 }
626 } 626 }
627
628 delete endDate;
627 } 629 }
628 // Skip trailing "AND" 630 // Skip trailing "AND"
@@ -826,5 +828,5 @@ QMap<int, QString> OPimContactAccessBackend_SQL::requestNonCustom( int uid ) co
826 nonCustomMap = fillNonCustomMap( resItem ); 828 nonCustomMap = fillNonCustomMap( resItem );
827 t3needed = t3.elapsed(); 829 t3needed = t3.elapsed();
828 830
829 831
830 // odebug << "Adding UID: " << resItem.data( "uid" ) << "" << oendl; 832 // odebug << "Adding UID: " << resItem.data( "uid" ) << "" << oendl;
@@ -835,5 +837,5 @@ QMap<int, QString> OPimContactAccessBackend_SQL::requestNonCustom( int uid ) co
835} 837}
836 838
837/* Returns contact requested by uid and fills cache with contacts requested by uids in the cachelist */ 839/* Returns contact requested by uid and fills cache with contacts requested by uids in the cachelist */
838OPimContact OPimContactAccessBackend_SQL::requestContactsAndCache( int uid, const QArray<int>& uidlist )const 840OPimContact OPimContactAccessBackend_SQL::requestContactsAndCache( int uid, const QArray<int>& uidlist )const
839{ 841{
@@ -841,5 +843,5 @@ OPimContact OPimContactAccessBackend_SQL::requestContactsAndCache( int uid, cons
841 // We don't have to add the given uid to the uidlist, it is expected to be there already (see opimrecordlist.h). 843 // We don't have to add the given uid to the uidlist, it is expected to be there already (see opimrecordlist.h).
842 // All contacts will be stored in the cache, afterwards the contact with the user id "uid" will be returned 844 // All contacts will be stored in the cache, afterwards the contact with the user id "uid" will be returned
843 // by using the cache.. 845 // by using the cache..
844 QArray<int> cachelist = uidlist; 846 QArray<int> cachelist = uidlist;
845 OPimContact retContact; 847 OPimContact retContact;
@@ -872,10 +874,10 @@ OPimContact OPimContactAccessBackend_SQL::requestContactsAndCache( int uid, cons
872 } while ( ! res_noncustom.atEnd() ); //atEnd() is true if we are past(!) the list !! 874 } while ( ! res_noncustom.atEnd() ); //atEnd() is true if we are past(!) the list !!
873 t3needed = t3.elapsed(); 875 t3needed = t3.elapsed();
874 876
875 877
876 // odebug << "Adding UID: " << resItem.data( "uid" ) << "" << oendl; 878 // odebug << "Adding UID: " << resItem.data( "uid" ) << "" << oendl;
877 odebug << "RequestContactsAndCache needed: insg.:" << t.elapsed() << " ms, query: " << t2needed 879 odebug << "RequestContactsAndCache needed: insg.:" << t.elapsed() << " ms, query: " << t2needed
878 << " ms, mapping: " << t3needed << " ms" << oendl; 880 << " ms, mapping: " << t3needed << " ms" << oendl;
879 881
880 return retContact; 882 return retContact;
881} 883}