summaryrefslogtreecommitdiff
path: root/libopie2/opiepim/backend/ocontactaccessbackend_sql.cpp
Unidiff
Diffstat (limited to 'libopie2/opiepim/backend/ocontactaccessbackend_sql.cpp') (more/less context) (show whitespace changes)
-rw-r--r--libopie2/opiepim/backend/ocontactaccessbackend_sql.cpp64
1 files changed, 34 insertions, 30 deletions
diff --git a/libopie2/opiepim/backend/ocontactaccessbackend_sql.cpp b/libopie2/opiepim/backend/ocontactaccessbackend_sql.cpp
index 14207be..dda23cc 100644
--- a/libopie2/opiepim/backend/ocontactaccessbackend_sql.cpp
+++ b/libopie2/opiepim/backend/ocontactaccessbackend_sql.cpp
@@ -34,9 +34,3 @@
34 34
35#include <qarray.h> 35/* OPIE */
36#include <qdatetime.h>
37#include <qstringlist.h>
38
39#include <qpe/global.h>
40#include <qpe/recordfields.h>
41
42#include <opie2/opimcontact.h> 36#include <opie2/opimcontact.h>
@@ -48,2 +42,12 @@
48#include <opie2/osqlquery.h> 42#include <opie2/osqlquery.h>
43#include <opie2/odebug.h>
44
45#include <qpe/global.h>
46#include <qpe/recordfields.h>
47
48/* QT */
49#include <qarray.h>
50#include <qdatetime.h>
51#include <qstringlist.h>
52
49 53
@@ -270,3 +274,3 @@ namespace {
270 // qu += "commit;"; 274 // qu += "commit;";
271 qDebug("add %s", qu.latin1() ); 275 odebug << "add " << qu << "" << oendl;
272 return qu; 276 return qu;
@@ -318,3 +322,3 @@ namespace {
318 322
319 // qWarning("find query: %s", qu.latin1() ); 323 // owarn << "find query: " << qu << "" << oendl;
320 return qu; 324 return qu;
@@ -352,3 +356,3 @@ OPimContactAccessBackend_SQL::OPimContactAccessBackend_SQL ( const QString& /* a
352{ 356{
353 qDebug("C'tor OPimContactAccessBackend_SQL starts"); 357 odebug << "C'tor OPimContactAccessBackend_SQL starts" << oendl;
354 QTime t; 358 QTime t;
@@ -369,3 +373,3 @@ OPimContactAccessBackend_SQL::OPimContactAccessBackend_SQL ( const QString& /* a
369 373
370 qDebug("C'tor OPimContactAccessBackend_SQL ends: %d ms", t.elapsed() ); 374 odebug << "C'tor OPimContactAccessBackend_SQL ends: " << t.elapsed() << " ms" << oendl;
371} 375}
@@ -432,3 +436,3 @@ bool OPimContactAccessBackend_SQL::add ( const OPimContact &newcontact )
432{ 436{
433 qDebug("add in contact SQL-Backend"); 437 odebug << "add in contact SQL-Backend" << oendl;
434 InsertQuery ins( newcontact ); 438 InsertQuery ins( newcontact );
@@ -471,3 +475,3 @@ OPimContact OPimContactAccessBackend_SQL::find ( int uid ) const
471{ 475{
472 qDebug("OPimContactAccessBackend_SQL::find()"); 476 odebug << "OPimContactAccessBackend_SQL::find()" << oendl;
473 QTime t; 477 QTime t;
@@ -478,3 +482,3 @@ OPimContact OPimContactAccessBackend_SQL::find ( int uid ) const
478 482
479 qDebug("OPimContactAccessBackend_SQL::find() needed: %d ms", t.elapsed() ); 483 odebug << "OPimContactAccessBackend_SQL::find() needed: " << t.elapsed() << " ms" << oendl;
480 return retContact; 484 return retContact;
@@ -587,3 +591,3 @@ QArray<int> OPimContactAccessBackend_SQL::queryByExample ( const OPimContact &qu
587 591
588 qDebug( "queryByExample query: %s", qu.latin1() ); 592 odebug << "queryByExample query: " << qu << "" << oendl;
589 593
@@ -622,3 +626,3 @@ QArray<int> OPimContactAccessBackend_SQL::matchRegexp( const QRegExp &r ) const
622 626
623 qDebug( "query: %s", qu.latin1() ); 627 odebug << "query: " << qu << "" << oendl;
624 628
@@ -703,3 +707,3 @@ QArray<int> OPimContactAccessBackend_SQL::sorted( bool asc, int , int , int )
703 707
704 // qDebug("sorted query is: %s", query.latin1() ); 708 // odebug << "sorted query is: " << query << "" << oendl;
705 709
@@ -714,3 +718,3 @@ QArray<int> OPimContactAccessBackend_SQL::sorted( bool asc, int , int , int )
714 718
715 qDebug("sorted needed %d ms!", t.elapsed() ); 719 odebug << "sorted needed " << t.elapsed() << " ms!" << oendl;
716 return list; 720 return list;
@@ -721,3 +725,3 @@ void OPimContactAccessBackend_SQL::update()
721{ 725{
722 qDebug("Update starts"); 726 odebug << "Update starts" << oendl;
723 QTime t; 727 QTime t;
@@ -737,3 +741,3 @@ void OPimContactAccessBackend_SQL::update()
737 741
738 qDebug("Update ends %d ms", t.elapsed() ); 742 odebug << "Update ends " << t.elapsed() << " ms" << oendl;
739} 743}
@@ -742,3 +746,3 @@ QArray<int> OPimContactAccessBackend_SQL::extractUids( OSQLResult& res ) const
742{ 746{
743 qDebug("extractUids"); 747 odebug << "extractUids" << oendl;
744 QTime t; 748 QTime t;
@@ -748,3 +752,3 @@ QArray<int> OPimContactAccessBackend_SQL::extractUids( OSQLResult& res ) const
748 QArray<int> ints(list.count() ); 752 QArray<int> ints(list.count() );
749 qDebug(" count = %d", list.count() ); 753 odebug << " count = " << list.count() << "" << oendl;
750 754
@@ -755,3 +759,3 @@ QArray<int> OPimContactAccessBackend_SQL::extractUids( OSQLResult& res ) const
755 } 759 }
756 qDebug("extractUids ready: count2 = %d needs %d ms", i, t.elapsed() ); 760 odebug << "extractUids ready: count2 = " << i << " needs " << t.elapsed() << " ms" << oendl;
757 761
@@ -790,3 +794,3 @@ QMap<int, QString> OPimContactAccessBackend_SQL::requestNonCustom( int uid ) co
790 794
791 // qDebug("Reading %s... found: %s", (*it).latin1(), value.latin1() ); 795 // odebug << "Reading " << (*it) << "... found: " << value << "" << oendl;
792 796
@@ -808,3 +812,3 @@ QMap<int, QString> OPimContactAccessBackend_SQL::requestNonCustom( int uid ) co
808 case Qtopia::AddressCategory: 812 case Qtopia::AddressCategory:
809 qDebug("Category is: %s", value.latin1() ); 813 odebug << "Category is: " << value << "" << oendl;
810 default: 814 default:
@@ -818,5 +822,5 @@ QMap<int, QString> OPimContactAccessBackend_SQL::requestNonCustom( int uid ) co
818 822
819 // qDebug("Adding UID: %s", resItem.data( "uid" ).latin1() ); 823 // odebug << "Adding UID: " << resItem.data( "uid" ) << "" << oendl;
820 qDebug("RequestNonCustom needed: insg.:%d ms, query: %d ms, mapping: %d ms", 824 odebug << "RequestNonCustom needed: insg.:" << t.elapsed() << " ms, query: " << t2needed
821 t.elapsed(), t2needed, t3needed ); 825 << " ms, mapping: " << t3needed << " ms" << oendl;
822 826
@@ -836,3 +840,3 @@ QMap<QString, QString> OPimContactAccessBackend_SQL::requestCustom( int uid ) c
836 if ( res_custom.state() == OSQLResult::Failure ) { 840 if ( res_custom.state() == OSQLResult::Failure ) {
837 qWarning("OSQLResult::Failure in find query !!"); 841 owarn << "OSQLResult::Failure in find query !!" << oendl;
838 QMap<QString, QString> empty; 842 QMap<QString, QString> empty;
@@ -847,3 +851,3 @@ QMap<QString, QString> OPimContactAccessBackend_SQL::requestCustom( int uid ) c
847 851
848 qDebug("RequestCustom needed: %d ms", t.elapsed() ); 852 odebug << "RequestCustom needed: " << t.elapsed() << " ms" << oendl;
849 return customMap; 853 return customMap;