-rw-r--r-- | core/pim/todo/tableview.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/core/pim/todo/tableview.cpp b/core/pim/todo/tableview.cpp index 39f0d72..8cd2e7e 100644 --- a/core/pim/todo/tableview.cpp +++ b/core/pim/todo/tableview.cpp @@ -138,49 +138,50 @@ QString TableView::currentRepresentation() { /* show overdue */ void TableView::showOverDue( bool ) { clear(); setTodos( begin(), end() ); } void TableView::setTodos( OTodoAccess::List::Iterator it, OTodoAccess::List::Iterator end ) { qWarning("setTodos"); QTime time; time.start(); m_enablePaint = false; setUpdatesEnabled( false ); viewport()->setUpdatesEnabled( false ); clear(); QString currentCat = todoWindow()->currentCategory(); - bool showCompleted = todoWindow()->currentCatId(); + bool showCompleted = todoWindow()->showCompleted(); bool showOverDue = todoWindow()->showOverDue(); qWarning( "Current Category:" + todoWindow()->currentCategory() ); int id = todoWindow()->currentCatId(); QTime t; t.start(); setNumRows( it.count() ); uint i = 0; for (; it != end; ++it ) { OTodo todo = (*it); /* test if the categories match */ if ( !currentCat.isEmpty() && !todo.categories().contains( id ) ) { continue; } /* the item is completed but we shouldn't show it */ if ( !showCompleted && todo.isCompleted() ) { + qWarning("isCompleted "); continue; } /* the item is not overdue but we should only show overdue */ if ( showOverDue && !todo.isOverdue() ) { continue; } /* now it's fine to add it */ insertTodo( todo, i ); i++; } setNumRows( i ); int elc = time.elapsed(); qWarning("Adding took %d", elc/1000 ); setUpdatesEnabled( true ); viewport()->setUpdatesEnabled( true ); viewport()->update(); |