summaryrefslogtreecommitdiff
path: root/libopie2/opiepim/backend/ocontactaccessbackend_sql.cpp
authorar <ar>2004-06-01 21:38:07 (UTC)
committer ar <ar>2004-06-01 21:38:07 (UTC)
commitbaed1d5ab8589aef14440009bc4e7380bcc5a741 (patch) (side-by-side diff)
treec636e892c5eec0df2b36d16cb601a7da41a2ef0f /libopie2/opiepim/backend/ocontactaccessbackend_sql.cpp
parent4438393d8eef624565e840b798429071829adea8 (diff)
downloadopie-baed1d5ab8589aef14440009bc4e7380bcc5a741.zip
opie-baed1d5ab8589aef14440009bc4e7380bcc5a741.tar.gz
opie-baed1d5ab8589aef14440009bc4e7380bcc5a741.tar.bz2
- convert to odebug framework
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 @@
-#include <qarray.h>
-#include <qdatetime.h>
-#include <qstringlist.h>
-
-#include <qpe/global.h>
-#include <qpe/recordfields.h>
-
+/* OPIE */
#include <opie2/opimcontact.h>
@@ -48,2 +42,12 @@
#include <opie2/osqlquery.h>
+#include <opie2/odebug.h>
+
+#include <qpe/global.h>
+#include <qpe/recordfields.h>
+
+/* QT */
+#include <qarray.h>
+#include <qdatetime.h>
+#include <qstringlist.h>
+
@@ -270,3 +274,3 @@ namespace {
// qu += "commit;";
- qDebug("add %s", qu.latin1() );
+ odebug << "add " << qu << "" << oendl;
return qu;
@@ -318,3 +322,3 @@ namespace {
- // qWarning("find query: %s", qu.latin1() );
+ // owarn << "find query: " << qu << "" << oendl;
return qu;
@@ -352,3 +356,3 @@ OPimContactAccessBackend_SQL::OPimContactAccessBackend_SQL ( const QString& /* a
{
- qDebug("C'tor OPimContactAccessBackend_SQL starts");
+ odebug << "C'tor OPimContactAccessBackend_SQL starts" << oendl;
QTime t;
@@ -369,3 +373,3 @@ OPimContactAccessBackend_SQL::OPimContactAccessBackend_SQL ( const QString& /* a
- qDebug("C'tor OPimContactAccessBackend_SQL ends: %d ms", t.elapsed() );
+ odebug << "C'tor OPimContactAccessBackend_SQL ends: " << t.elapsed() << " ms" << oendl;
}
@@ -432,3 +436,3 @@ bool OPimContactAccessBackend_SQL::add ( const OPimContact &newcontact )
{
- qDebug("add in contact SQL-Backend");
+ odebug << "add in contact SQL-Backend" << oendl;
InsertQuery ins( newcontact );
@@ -471,3 +475,3 @@ OPimContact OPimContactAccessBackend_SQL::find ( int uid ) const
{
- qDebug("OPimContactAccessBackend_SQL::find()");
+ odebug << "OPimContactAccessBackend_SQL::find()" << oendl;
QTime t;
@@ -478,3 +482,3 @@ OPimContact OPimContactAccessBackend_SQL::find ( int uid ) const
- qDebug("OPimContactAccessBackend_SQL::find() needed: %d ms", t.elapsed() );
+ odebug << "OPimContactAccessBackend_SQL::find() needed: " << t.elapsed() << " ms" << oendl;
return retContact;
@@ -587,3 +591,3 @@ QArray<int> OPimContactAccessBackend_SQL::queryByExample ( const OPimContact &qu
- qDebug( "queryByExample query: %s", qu.latin1() );
+ odebug << "queryByExample query: " << qu << "" << oendl;
@@ -622,3 +626,3 @@ QArray<int> OPimContactAccessBackend_SQL::matchRegexp( const QRegExp &r ) const
- qDebug( "query: %s", qu.latin1() );
+ odebug << "query: " << qu << "" << oendl;
@@ -703,3 +707,3 @@ QArray<int> OPimContactAccessBackend_SQL::sorted( bool asc, int , int , int )
- // qDebug("sorted query is: %s", query.latin1() );
+ // odebug << "sorted query is: " << query << "" << oendl;
@@ -714,3 +718,3 @@ QArray<int> OPimContactAccessBackend_SQL::sorted( bool asc, int , int , int )
- qDebug("sorted needed %d ms!", t.elapsed() );
+ odebug << "sorted needed " << t.elapsed() << " ms!" << oendl;
return list;
@@ -721,3 +725,3 @@ void OPimContactAccessBackend_SQL::update()
{
- qDebug("Update starts");
+ odebug << "Update starts" << oendl;
QTime t;
@@ -737,3 +741,3 @@ void OPimContactAccessBackend_SQL::update()
- qDebug("Update ends %d ms", t.elapsed() );
+ odebug << "Update ends " << t.elapsed() << " ms" << oendl;
}
@@ -742,3 +746,3 @@ QArray<int> OPimContactAccessBackend_SQL::extractUids( OSQLResult& res ) const
{
- qDebug("extractUids");
+ odebug << "extractUids" << oendl;
QTime t;
@@ -748,3 +752,3 @@ QArray<int> OPimContactAccessBackend_SQL::extractUids( OSQLResult& res ) const
QArray<int> ints(list.count() );
- qDebug(" count = %d", list.count() );
+ odebug << " count = " << list.count() << "" << oendl;
@@ -755,3 +759,3 @@ QArray<int> OPimContactAccessBackend_SQL::extractUids( OSQLResult& res ) const
}
- qDebug("extractUids ready: count2 = %d needs %d ms", i, t.elapsed() );
+ odebug << "extractUids ready: count2 = " << i << " needs " << t.elapsed() << " ms" << oendl;
@@ -790,3 +794,3 @@ QMap<int, QString> OPimContactAccessBackend_SQL::requestNonCustom( int uid ) co
- // qDebug("Reading %s... found: %s", (*it).latin1(), value.latin1() );
+ // odebug << "Reading " << (*it) << "... found: " << value << "" << oendl;
@@ -808,3 +812,3 @@ QMap<int, QString> OPimContactAccessBackend_SQL::requestNonCustom( int uid ) co
case Qtopia::AddressCategory:
- qDebug("Category is: %s", value.latin1() );
+ odebug << "Category is: " << value << "" << oendl;
default:
@@ -818,5 +822,5 @@ QMap<int, QString> OPimContactAccessBackend_SQL::requestNonCustom( int uid ) co
- // qDebug("Adding UID: %s", resItem.data( "uid" ).latin1() );
- qDebug("RequestNonCustom needed: insg.:%d ms, query: %d ms, mapping: %d ms",
- t.elapsed(), t2needed, t3needed );
+ // odebug << "Adding UID: " << resItem.data( "uid" ) << "" << oendl;
+ odebug << "RequestNonCustom needed: insg.:" << t.elapsed() << " ms, query: " << t2needed
+ << " ms, mapping: " << t3needed << " ms" << oendl;
@@ -836,3 +840,3 @@ QMap<QString, QString> OPimContactAccessBackend_SQL::requestCustom( int uid ) c
if ( res_custom.state() == OSQLResult::Failure ) {
- qWarning("OSQLResult::Failure in find query !!");
+ owarn << "OSQLResult::Failure in find query !!" << oendl;
QMap<QString, QString> empty;
@@ -847,3 +851,3 @@ QMap<QString, QString> OPimContactAccessBackend_SQL::requestCustom( int uid ) c
- qDebug("RequestCustom needed: %d ms", t.elapsed() );
+ odebug << "RequestCustom needed: " << t.elapsed() << " ms" << oendl;
return customMap;