summaryrefslogtreecommitdiff
path: root/core/pim/todo/todotable.h
Unidiff
Diffstat (limited to 'core/pim/todo/todotable.h') (more/less context) (ignore whitespace changes)
-rw-r--r--core/pim/todo/todotable.h11
1 files changed, 7 insertions, 4 deletions
diff --git a/core/pim/todo/todotable.h b/core/pim/todo/todotable.h
index 39e00d1..7539df1 100644
--- a/core/pim/todo/todotable.h
+++ b/core/pim/todo/todotable.h
@@ -71,7 +71,7 @@ private:
71class TodoTextItem : public QTableItem 71class TodoTextItem : public QTableItem
72{ 72{
73public: 73public:
74 TodoTextItem( QTable *t, const QString & str ) 74 TodoTextItem( QTable *t, const QString & str )
75 :QTableItem( t, QTableItem::Never, str ) {} 75 :QTableItem( t, QTableItem::Never, str ) {}
76 76
77 QString key () const { return Qtopia::buildSortKey( text() ); } 77 QString key () const { return Qtopia::buildSortKey( text() ); }
@@ -192,8 +192,11 @@ private:
192 192
193inline void TodoTable::insertIntoTable( ToDoEvent *todo, int row ) 193inline void TodoTable::insertIntoTable( ToDoEvent *todo, int row )
194{ 194{
195 QString sortKey = (char) ((todo->isCompleted() ? 'a' : 'A') 195 int rows = numRows();
196 + todo->priority() ) 196 ++rows;
197 setNumRows( rows );
198 QString sortKey = (char) ((todo->isCompleted() ? 'a' : 'A')
199 + todo->priority() )
197 + Qtopia::buildSortKey( todo->description() ); 200 + Qtopia::buildSortKey( todo->description() );
198 CheckItem *chk = new CheckItem( this, sortKey ); 201 CheckItem *chk = new CheckItem( this, sortKey );
199 chk->setChecked( todo->isCompleted() ); 202 chk->setChecked( todo->isCompleted() );
@@ -205,7 +208,7 @@ inline void TodoTable::insertIntoTable( ToDoEvent *todo, int row )
205 208
206 DueTextItem *due = new DueTextItem(this, todo ); 209 DueTextItem *due = new DueTextItem(this, todo );
207 setItem( row, 3, due); 210 setItem( row, 3, due);
208 211
209 setItem( row, 0, chk ); 212 setItem( row, 0, chk );
210 setItem( row, 1, cmb ); 213 setItem( row, 1, cmb );
211 setItem( row, 2, ti ); 214 setItem( row, 2, ti );