summaryrefslogtreecommitdiff
path: root/libopie2/opiepim/backend/otodoaccesssql.cpp
Unidiff
Diffstat (limited to 'libopie2/opiepim/backend/otodoaccesssql.cpp') (more/less context) (show whitespace changes)
-rw-r--r--libopie2/opiepim/backend/otodoaccesssql.cpp48
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 @@
30 30
31#include <qdatetime.h> 31/* OPIE */
32#include <qmap.h>
33#include <qstring.h>
34
35#include <qpe/global.h>
36
37#include <opie2/osqldriver.h> 32#include <opie2/osqldriver.h>
@@ -45,2 +40,11 @@
45#include <opie2/opimrecurrence.h> 40#include <opie2/opimrecurrence.h>
41#include <opie2/odebug.h>
42
43#include <qpe/global.h>
44
45/* QT */
46#include <qdatetime.h>
47#include <qmap.h>
48#include <qstring.h>
49
46 50
@@ -293,3 +297,3 @@ namespace {
293 297
294 qDebug("add %s", qu.latin1() ); 298 odebug << "add " << qu << "" << oendl;
295 return qu; 299 return qu;
@@ -458,3 +462,3 @@ OPimTodo OPimTodoAccessBackendSQL::find( int uid, const QArray<int>& ints,
458 uint CACHE = readAhead(); 462 uint CACHE = readAhead();
459 qDebug("searching for %d", uid ); 463 odebug << "searching for " << uid << "" << oendl;
460 QArray<int> search( CACHE ); 464 QArray<int> search( CACHE );
@@ -468,3 +472,3 @@ OPimTodo OPimTodoAccessBackendSQL::find( int uid, const QArray<int>& ints,
468 for (uint i = cur; i < ints.count() && size < CACHE; i++ ) { 472 for (uint i = cur; i < ints.count() && size < CACHE; i++ ) {
469 qDebug("size %d %d", size, ints[i] ); 473 odebug << "size " << size << " " << ints[i] << "" << oendl;
470 search[size] = ints[i]; 474 search[size] = ints[i];
@@ -543,3 +547,3 @@ QArray<int> OPimTodoAccessBackendSQL::sorted( bool asc, int sortOrder,
543 int sortFilter, int cat ) { 547 int sortFilter, int cat ) {
544 qDebug("sorted %d, %d", asc, sortOrder ); 548 odebug << "sorted " << asc << ", " << sortOrder << "" << oendl;
545 QString query; 549 QString query;
@@ -602,3 +606,3 @@ QArray<int> OPimTodoAccessBackendSQL::sorted( bool asc, int sortOrder,
602 if ( !asc ) { 606 if ( !asc ) {
603 qDebug("not ascending!"); 607 odebug << "not ascending!" << oendl;
604 query += " DESC"; 608 query += " DESC";
@@ -606,3 +610,3 @@ QArray<int> OPimTodoAccessBackendSQL::sorted( bool asc, int sortOrder,
606 610
607 qDebug( query ); 611 odebug << query << oendl;
608 OSQLRawQuery raw(query ); 612 OSQLRawQuery raw(query );
@@ -631,3 +635,3 @@ OPimTodo OPimTodoAccessBackendSQL::todo( const OSQLResult& res ) const{
631 OSQLResultItem::ValueList::Iterator it = list.begin(); 635 OSQLResultItem::ValueList::Iterator it = list.begin();
632 qDebug("todo1"); 636 odebug << "todo1" << oendl;
633 OPimTodo to = todo( (*it) ); 637 OPimTodo to = todo( (*it) );
@@ -637,3 +641,3 @@ OPimTodo OPimTodoAccessBackendSQL::todo( const OSQLResult& res ) const{
637 for ( ; it != list.end(); ++it ) { 641 for ( ; it != list.end(); ++it ) {
638 qDebug("caching"); 642 odebug << "caching" << oendl;
639 cache( todo( (*it) ) ); 643 cache( todo( (*it) ) );
@@ -643,3 +647,3 @@ OPimTodo OPimTodoAccessBackendSQL::todo( const OSQLResult& res ) const{
643OPimTodo OPimTodoAccessBackendSQL::todo( OSQLResultItem& item )const { 647OPimTodo OPimTodoAccessBackendSQL::todo( OSQLResultItem& item )const {
644 qDebug("todo(ResultItem)"); 648 odebug << "todo(ResultItem)" << oendl;
645 649
@@ -651,3 +655,3 @@ OPimTodo OPimTodoAccessBackendSQL::todo( OSQLResultItem& item )const {
651 655
652 qDebug("Item is completed: %d", item.data("completed").toInt() ); 656 odebug << "Item is completed: " << item.data("completed").toInt() << "" << oendl;
653 657
@@ -752,3 +756,3 @@ QArray<int> OPimTodoAccessBackendSQL::uids( const OSQLResult& res) const{
752 QArray<int> ints(list.count() ); 756 QArray<int> ints(list.count() );
753 qDebug(" count = %d", list.count() ); 757 odebug << " count = " << list.count() << "" << oendl;
754 758
@@ -778,3 +782,3 @@ QArray<int> OPimTodoAccessBackendSQL::matchRegexp( const QRegExp &r ) const
778 782
779 qDebug( "query: %s", qu.latin1() ); 783 odebug << "query: " << qu << "" << oendl;
780 784
@@ -818,3 +822,3 @@ void OPimTodoAccessBackendSQL::removeAllCompleted(){
818 822
819 qDebug( "Number of completed: %d", completed_uids.size() ); 823 odebug << "Number of completed: " << completed_uids.size() << "" << oendl;
820 824
@@ -844,3 +848,3 @@ void OPimTodoAccessBackendSQL::removeAllCompleted(){
844 848
845 qDebug( "query: %s", qu.latin1() ); 849 odebug << "query: " << qu << "" << oendl;
846 850
@@ -849,3 +853,3 @@ void OPimTodoAccessBackendSQL::removeAllCompleted(){
849 if ( res.state() == OSQLResult::Failure ) { 853 if ( res.state() == OSQLResult::Failure ) {
850 qWarning("OPimTodoAccessBackendSQL::removeAllCompleted():Failure in query: %s", qu.latin1() ); 854 owarn << "OPimTodoAccessBackendSQL::removeAllCompleted():Failure in query: " << qu << "" << oendl;
851 } 855 }
@@ -862,3 +866,3 @@ QMap<QString, QString> OPimTodoAccessBackendSQL::requestCustom( int uid ) const
862 if ( res_custom.state() == OSQLResult::Failure ) { 866 if ( res_custom.state() == OSQLResult::Failure ) {
863 qWarning("OSQLResult::Failure in find query !!"); 867 owarn << "OSQLResult::Failure in find query !!" << oendl;
864 QMap<QString, QString> empty; 868 QMap<QString, QString> empty;