-rw-r--r-- | libopie/pim/otodoaccesssql.cpp | 7 | ||||
-rw-r--r-- | libopie2/opiepim/backend/otodoaccesssql.cpp | 7 |
2 files changed, 10 insertions, 4 deletions
diff --git a/libopie/pim/otodoaccesssql.cpp b/libopie/pim/otodoaccesssql.cpp index 25536e0..8add9f7 100644 --- a/libopie/pim/otodoaccesssql.cpp +++ b/libopie/pim/otodoaccesssql.cpp | |||
@@ -325,3 +325,5 @@ QArray<int> OTodoAccessBackendSQL::sorted( bool asc, int sortOrder, | |||
325 | if ( sortFilter & 1 ) { | 325 | if ( sortFilter & 1 ) { |
326 | query += " categories like '%" +QString::number(cat)+"%' AND"; | 326 | QString str; |
327 | if (cat != 0 ) str = QString::number( cat ); | ||
328 | query += " categories like '%" +str+"%' AND"; | ||
327 | } | 329 | } |
@@ -332,3 +334,3 @@ QArray<int> OTodoAccessBackendSQL::sorted( bool asc, int sortOrder, | |||
332 | QString base; | 334 | QString base; |
333 | base = QString("DueDate <= '%1-%2-%3' AND WHERE completed = 0").arg( date.year() ).arg( date.month() ).arg( date.day() ); | 335 | base = QString("DueDate <= '%1-%2-%3' AND completed = 0").arg( date.year() ).arg( date.month() ).arg( date.day() ); |
334 | query += " " + base + " AND"; | 336 | query += " " + base + " AND"; |
@@ -445,2 +447,3 @@ QArray<int> OTodoAccessBackendSQL::uids( const OSQLResult& res) const{ | |||
445 | QArray<int> ints(list.count() ); | 447 | QArray<int> ints(list.count() ); |
448 | qWarning(" count = %d", list.count() ); | ||
446 | 449 | ||
diff --git a/libopie2/opiepim/backend/otodoaccesssql.cpp b/libopie2/opiepim/backend/otodoaccesssql.cpp index 25536e0..8add9f7 100644 --- a/libopie2/opiepim/backend/otodoaccesssql.cpp +++ b/libopie2/opiepim/backend/otodoaccesssql.cpp | |||
@@ -325,3 +325,5 @@ QArray<int> OTodoAccessBackendSQL::sorted( bool asc, int sortOrder, | |||
325 | if ( sortFilter & 1 ) { | 325 | if ( sortFilter & 1 ) { |
326 | query += " categories like '%" +QString::number(cat)+"%' AND"; | 326 | QString str; |
327 | if (cat != 0 ) str = QString::number( cat ); | ||
328 | query += " categories like '%" +str+"%' AND"; | ||
327 | } | 329 | } |
@@ -332,3 +334,3 @@ QArray<int> OTodoAccessBackendSQL::sorted( bool asc, int sortOrder, | |||
332 | QString base; | 334 | QString base; |
333 | base = QString("DueDate <= '%1-%2-%3' AND WHERE completed = 0").arg( date.year() ).arg( date.month() ).arg( date.day() ); | 335 | base = QString("DueDate <= '%1-%2-%3' AND completed = 0").arg( date.year() ).arg( date.month() ).arg( date.day() ); |
334 | query += " " + base + " AND"; | 336 | query += " " + base + " AND"; |
@@ -445,2 +447,3 @@ QArray<int> OTodoAccessBackendSQL::uids( const OSQLResult& res) const{ | |||
445 | QArray<int> ints(list.count() ); | 447 | QArray<int> ints(list.count() ); |
448 | qWarning(" count = %d", list.count() ); | ||
446 | 449 | ||