Diffstat (limited to 'libopie2/opiepim/backend/otodoaccesssql.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | libopie2/opiepim/backend/otodoaccesssql.cpp | 48 |
1 files changed, 26 insertions, 22 deletions
diff --git a/libopie2/opiepim/backend/otodoaccesssql.cpp b/libopie2/opiepim/backend/otodoaccesssql.cpp index 132b5a6..6f65c48 100644 --- a/libopie2/opiepim/backend/otodoaccesssql.cpp +++ b/libopie2/opiepim/backend/otodoaccesssql.cpp @@ -30,8 +30,3 @@ -#include <qdatetime.h> -#include <qmap.h> -#include <qstring.h> - -#include <qpe/global.h> - +/* OPIE */ #include <opie2/osqldriver.h> @@ -45,2 +40,11 @@ #include <opie2/opimrecurrence.h> +#include <opie2/odebug.h> + +#include <qpe/global.h> + +/* QT */ +#include <qdatetime.h> +#include <qmap.h> +#include <qstring.h> + @@ -293,3 +297,3 @@ namespace { - qDebug("add %s", qu.latin1() ); + odebug << "add " << qu << "" << oendl; return qu; @@ -458,3 +462,3 @@ OPimTodo OPimTodoAccessBackendSQL::find( int uid, const QArray<int>& ints, uint CACHE = readAhead(); - qDebug("searching for %d", uid ); + odebug << "searching for " << uid << "" << oendl; QArray<int> search( CACHE ); @@ -468,3 +472,3 @@ OPimTodo OPimTodoAccessBackendSQL::find( int uid, const QArray<int>& ints, for (uint i = cur; i < ints.count() && size < CACHE; i++ ) { - qDebug("size %d %d", size, ints[i] ); + odebug << "size " << size << " " << ints[i] << "" << oendl; search[size] = ints[i]; @@ -543,3 +547,3 @@ QArray<int> OPimTodoAccessBackendSQL::sorted( bool asc, int sortOrder, int sortFilter, int cat ) { - qDebug("sorted %d, %d", asc, sortOrder ); + odebug << "sorted " << asc << ", " << sortOrder << "" << oendl; QString query; @@ -602,3 +606,3 @@ QArray<int> OPimTodoAccessBackendSQL::sorted( bool asc, int sortOrder, if ( !asc ) { - qDebug("not ascending!"); + odebug << "not ascending!" << oendl; query += " DESC"; @@ -606,3 +610,3 @@ QArray<int> OPimTodoAccessBackendSQL::sorted( bool asc, int sortOrder, - qDebug( query ); + odebug << query << oendl; OSQLRawQuery raw(query ); @@ -631,3 +635,3 @@ OPimTodo OPimTodoAccessBackendSQL::todo( const OSQLResult& res ) const{ OSQLResultItem::ValueList::Iterator it = list.begin(); - qDebug("todo1"); + odebug << "todo1" << oendl; OPimTodo to = todo( (*it) ); @@ -637,3 +641,3 @@ OPimTodo OPimTodoAccessBackendSQL::todo( const OSQLResult& res ) const{ for ( ; it != list.end(); ++it ) { - qDebug("caching"); + odebug << "caching" << oendl; cache( todo( (*it) ) ); @@ -643,3 +647,3 @@ OPimTodo OPimTodoAccessBackendSQL::todo( const OSQLResult& res ) const{ OPimTodo OPimTodoAccessBackendSQL::todo( OSQLResultItem& item )const { - qDebug("todo(ResultItem)"); + odebug << "todo(ResultItem)" << oendl; @@ -651,3 +655,3 @@ OPimTodo OPimTodoAccessBackendSQL::todo( OSQLResultItem& item )const { - qDebug("Item is completed: %d", item.data("completed").toInt() ); + odebug << "Item is completed: " << item.data("completed").toInt() << "" << oendl; @@ -752,3 +756,3 @@ QArray<int> OPimTodoAccessBackendSQL::uids( const OSQLResult& res) const{ QArray<int> ints(list.count() ); - qDebug(" count = %d", list.count() ); + odebug << " count = " << list.count() << "" << oendl; @@ -778,3 +782,3 @@ QArray<int> OPimTodoAccessBackendSQL::matchRegexp( const QRegExp &r ) const - qDebug( "query: %s", qu.latin1() ); + odebug << "query: " << qu << "" << oendl; @@ -818,3 +822,3 @@ void OPimTodoAccessBackendSQL::removeAllCompleted(){ - qDebug( "Number of completed: %d", completed_uids.size() ); + odebug << "Number of completed: " << completed_uids.size() << "" << oendl; @@ -844,3 +848,3 @@ void OPimTodoAccessBackendSQL::removeAllCompleted(){ - qDebug( "query: %s", qu.latin1() ); + odebug << "query: " << qu << "" << oendl; @@ -849,3 +853,3 @@ void OPimTodoAccessBackendSQL::removeAllCompleted(){ if ( res.state() == OSQLResult::Failure ) { - qWarning("OPimTodoAccessBackendSQL::removeAllCompleted():Failure in query: %s", qu.latin1() ); + owarn << "OPimTodoAccessBackendSQL::removeAllCompleted():Failure in query: " << qu << "" << oendl; } @@ -862,3 +866,3 @@ QMap<QString, QString> OPimTodoAccessBackendSQL::requestCustom( int uid ) const if ( res_custom.state() == OSQLResult::Failure ) { - qWarning("OSQLResult::Failure in find query !!"); + owarn << "OSQLResult::Failure in find query !!" << oendl; QMap<QString, QString> empty; |