summaryrefslogtreecommitdiff
path: root/libopie/pim/otodoaccessxml.cpp
authorzecke <zecke>2002-10-07 23:54:18 (UTC)
committer zecke <zecke>2002-10-07 23:54:18 (UTC)
commit02464ee120e2661d1fb30b0743ce64626c2d3133 (patch) (side-by-side diff)
treef53d7f4c91eaee616b3c67401bd213dbfad57d43 /libopie/pim/otodoaccessxml.cpp
parentdbdc38993798a0e223437908a46846b16541f843 (diff)
downloadopie-02464ee120e2661d1fb30b0743ce64626c2d3133.zip
opie-02464ee120e2661d1fb30b0743ce64626c2d3133.tar.gz
opie-02464ee120e2661d1fb30b0743ce64626c2d3133.tar.bz2
Fix sorted stuff
Case number 4 is still to go
Diffstat (limited to 'libopie/pim/otodoaccessxml.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--libopie/pim/otodoaccessxml.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/libopie/pim/otodoaccessxml.cpp b/libopie/pim/otodoaccessxml.cpp
index 80b8599..f3b0783 100644
--- a/libopie/pim/otodoaccessxml.cpp
+++ b/libopie/pim/otodoaccessxml.cpp
@@ -446,5 +446,4 @@ public:
*/
int compareItems( Item d1, Item d2 ) {
- qWarning("compare items");
int ret =0;
OTodoXMLContainer* con1 = (OTodoXMLContainer*)d1;
@@ -454,5 +453,4 @@ public:
if ( con1->todo.uid() == con2->todo.uid() )
return 0;
- qWarning("m_sort %d", m_sort );
switch ( m_sort ) {
@@ -488,4 +486,6 @@ public:
con2->todo.hasDueDate() )
ret = con1->todo.dueDate().daysTo( con2->todo.dueDate() );
+
+
else if ( con1->todo.hasDueDate() )
ret = -1;
@@ -512,4 +512,5 @@ public:
QArray<int> OTodoAccessXML::sorted( bool asc, int sortOrder,
int sortFilter, int cat ) {
+ qWarning("sorted! %d cat", cat);
OTodoXMLVector vector(m_events.count(), asc,sortOrder );
QMap<int, OTodo>::Iterator it;
@@ -517,14 +518,13 @@ QArray<int> OTodoAccessXML::sorted( bool asc, int sortOrder,
bool bCat = sortFilter & 1 ? true : false;
- bool bOver = sortFilter & 0 ? true : false;
bool bOnly = sortFilter & 2 ? true : false;
for ( it = m_events.begin(); it != m_events.end(); ++it ) {
/* show category */
- if ( bCat )
+ if ( bCat && cat != 0)
if (!(*it).categories().contains( cat ) )
continue;
/* isOverdue but we should not show overdue */
- if ( (*it).isOverdue() && ( !bOver || !bOnly ) )
+ if ( (*it).isOverdue() && !bOnly )
continue;
if ( !(*it).isOverdue() && bOnly )
@@ -545,4 +545,5 @@ QArray<int> OTodoAccessXML::sorted( bool asc, int sortOrder,
array[i] = ( vector.at(i) )->todo.uid();
}
+ qWarning("array count = %d %d", array.count(), vector.count() );
return array;
};