summaryrefslogtreecommitdiff
path: root/libopie2
authorzecke <zecke>2002-10-18 03:07:09 (UTC)
committer zecke <zecke>2002-10-18 03:07:09 (UTC)
commit86b3550348cf896b568e98d21da577c3f35a1a4a (patch) (side-by-side diff)
tree865a24eb260564d502b933a9af105871d2da6d0f /libopie2
parent218bc4583c545db50f3475930d61b1c76aca3fbd (diff)
downloadopie-86b3550348cf896b568e98d21da577c3f35a1a4a.zip
opie-86b3550348cf896b568e98d21da577c3f35a1a4a.tar.gz
opie-86b3550348cf896b568e98d21da577c3f35a1a4a.tar.bz2
Hi Stefan,
this commit should fix your problems... The XML todo backend was doing some stuff wrong with sorted Records. I even have a Comment describing this behaviour which is from the current POV wrong.. need to check my brain what I though this should do
Diffstat (limited to 'libopie2') (more/less context) (ignore whitespace changes)
-rw-r--r--libopie2/opiepim/backend/otodoaccessxml.cpp24
1 files changed, 19 insertions, 5 deletions
diff --git a/libopie2/opiepim/backend/otodoaccessxml.cpp b/libopie2/opiepim/backend/otodoaccessxml.cpp
index 3b4cab2..7a55c67 100644
--- a/libopie2/opiepim/backend/otodoaccessxml.cpp
+++ b/libopie2/opiepim/backend/otodoaccessxml.cpp
@@ -120,5 +120,5 @@ bool OTodoAccessXML::load() {
}
- qWarning("counts %d", m_events.count() );
+ qWarning("counts %d records loaded!", m_events.count() );
return true;
}
@@ -519,15 +519,28 @@ QArray<int> OTodoAccessXML::sorted( bool asc, int sortOrder,
bool bCat = sortFilter & 1 ? true : false;
bool bOnly = sortFilter & 2 ? true : false;
+ bool comp = sortFilter & 4 ? true : false;
for ( it = m_events.begin(); it != m_events.end(); ++it ) {
/* show category */
if ( bCat && cat != 0)
- if (!(*it).categories().contains( cat ) )
+ if (!(*it).categories().contains( cat ) ) {
+ qWarning("category mis match");
continue;
- /* isOverdue but we should not show overdue */
- if ( (*it).isOverdue() && !bOnly )
+ }
+ /* isOverdue but we should not show overdue - why?*/
+/* if ( (*it).isOverdue() && !bOnly ) {
+ qWarning("item is overdue but !bOnly");
+ continue;
+ }
+*/
+ if ( !(*it).isOverdue() && bOnly ) {
+ qWarning("item is not overdue but bOnly checked");
continue;
- if ( !(*it).isOverdue() && bOnly )
+ }
+
+ if ((*it).isCompleted() && comp ) {
+ qWarning("completed continue!");
continue;
+ }
@@ -537,4 +550,5 @@ QArray<int> OTodoAccessXML::sorted( bool asc, int sortOrder,
item++;
}
+ qWarning("XXX %d Items added", item);
vector.resize( item );
/* sort it now */