-rw-r--r-- | libopie/pim/otodoaccessxml.cpp | 24 | ||||
-rw-r--r-- | libopie2/opiepim/backend/otodoaccessxml.cpp | 24 |
2 files changed, 38 insertions, 10 deletions
diff --git a/libopie/pim/otodoaccessxml.cpp b/libopie/pim/otodoaccessxml.cpp index 3b4cab2..7a55c67 100644 --- a/libopie/pim/otodoaccessxml.cpp +++ b/libopie/pim/otodoaccessxml.cpp @@ -118,9 +118,9 @@ bool OTodoAccessXML::load() { */ m_events.insert(ev.uid(), ev ); } - qWarning("counts %d", m_events.count() ); + qWarning("counts %d records loaded!", m_events.count() ); return true; } bool OTodoAccessXML::reload() { return load(); @@ -517,26 +517,40 @@ QArray<int> OTodoAccessXML::sorted( bool asc, int sortOrder, int item = 0; 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; + } OTodoXMLContainer* con = new OTodoXMLContainer(); con->todo = (*it); vector.insert(item, con ); item++; } + qWarning("XXX %d Items added", item); vector.resize( item ); /* sort it now */ vector.sort(); /* now get the uids */ 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 @@ -118,9 +118,9 @@ bool OTodoAccessXML::load() { */ m_events.insert(ev.uid(), ev ); } - qWarning("counts %d", m_events.count() ); + qWarning("counts %d records loaded!", m_events.count() ); return true; } bool OTodoAccessXML::reload() { return load(); @@ -517,26 +517,40 @@ QArray<int> OTodoAccessXML::sorted( bool asc, int sortOrder, int item = 0; 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; + } OTodoXMLContainer* con = new OTodoXMLContainer(); con->todo = (*it); vector.insert(item, con ); item++; } + qWarning("XXX %d Items added", item); vector.resize( item ); /* sort it now */ vector.sort(); /* now get the uids */ |