author | zecke <zecke> | 2002-09-10 13:15:52 (UTC) |
---|---|---|
committer | zecke <zecke> | 2002-09-10 13:15:52 (UTC) |
commit | 4fe9ebf0faabcfdcdc0104309da59de043d9785a (patch) (unidiff) | |
tree | 0cdf6b1f45df2e014c1cceb4f943779861cc2767 /core/pim/todo/todotable.h | |
parent | 8db6dc7be6e274fe1ce762b15801052bce7bcf26 (diff) | |
download | opie-4fe9ebf0faabcfdcdc0104309da59de043d9785a.zip opie-4fe9ebf0faabcfdcdc0104309da59de043d9785a.tar.gz opie-4fe9ebf0faabcfdcdc0104309da59de043d9785a.tar.bz2 |
COmpile fixes
-rw-r--r-- | core/pim/todo/todotable.h | 11 |
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 | |||
@@ -68,13 +68,13 @@ private: | |||
68 | 68 | ||
69 | }; | 69 | }; |
70 | 70 | ||
71 | class TodoTextItem : public QTableItem | 71 | class TodoTextItem : public QTableItem |
72 | { | 72 | { |
73 | public: | 73 | public: |
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() ); } |
78 | }; | 78 | }; |
79 | 79 | ||
80 | class DueTextItem : public QTableItem | 80 | class DueTextItem : public QTableItem |
@@ -189,26 +189,29 @@ private: | |||
189 | bool showDeadl:1; | 189 | bool showDeadl:1; |
190 | }; | 190 | }; |
191 | 191 | ||
192 | 192 | ||
193 | inline void TodoTable::insertIntoTable( ToDoEvent *todo, int row ) | 193 | inline 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() ); |
200 | ComboItem *cmb = new ComboItem( this, QTableItem::WhenCurrent ); | 203 | ComboItem *cmb = new ComboItem( this, QTableItem::WhenCurrent ); |
201 | cmb->setText( QString::number( todo->priority() ) ); | 204 | cmb->setText( QString::number( todo->priority() ) ); |
202 | QString sum = todo->summary(); | 205 | QString sum = todo->summary(); |
203 | QTableItem *ti = new TodoTextItem( this, sum.isEmpty() ? todo->description().left(40).simplifyWhiteSpace() : sum ); | 206 | QTableItem *ti = new TodoTextItem( this, sum.isEmpty() ? todo->description().left(40).simplifyWhiteSpace() : sum ); |
204 | ti->setReplaceable( false ); | 207 | ti->setReplaceable( false ); |
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 ); |
212 | 215 | ||
213 | 216 | ||
214 | todoList.insert( chk, todo ); | 217 | todoList.insert( chk, todo ); |