summaryrefslogtreecommitdiff
Side-by-side diff
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--core/pim/todo/todotable.cpp4
-rw-r--r--core/pim/todo/todotable.h3
2 files changed, 4 insertions, 3 deletions
diff --git a/core/pim/todo/todotable.cpp b/core/pim/todo/todotable.cpp
index 779b28c..15f733b 100644
--- a/core/pim/todo/todotable.cpp
+++ b/core/pim/todo/todotable.cpp
@@ -231,6 +231,7 @@ TodoTable::TodoTable( QWidget *parent, const char *name )
currFindRow( -2 ),
showDeadl( true)
{
+ setNumRows(0);
mCat.load( categoryFileName() );
setSorting( TRUE );
setSelectionMode( NoSelection );
@@ -452,6 +453,9 @@ void TodoTable::updateVisible()
for ( int row = 0; row < numRows(); row++ ) {
CheckItem *ci = (CheckItem *)item( row, 0 );
ToDoEvent *t = todoList[ci];
+ if (!t)
+ continue;
+
QArray<int> vlCats = t->categories();
bool hide = false;
if ( !showComp && ci->isChecked() )
diff --git a/core/pim/todo/todotable.h b/core/pim/todo/todotable.h
index 7539df1..387dddb 100644
--- a/core/pim/todo/todotable.h
+++ b/core/pim/todo/todotable.h
@@ -192,9 +192,6 @@ private:
inline void TodoTable::insertIntoTable( ToDoEvent *todo, int row )
{
- int rows = numRows();
- ++rows;
- setNumRows( rows );
QString sortKey = (char) ((todo->isCompleted() ? 'a' : 'A')
+ todo->priority() )
+ Qtopia::buildSortKey( todo->description() );