author | zecke <zecke> | 2002-09-12 13:24:35 (UTC) |
---|---|---|
committer | zecke <zecke> | 2002-09-12 13:24:35 (UTC) |
commit | ff3af248587695ad5119057edc5e138acf2664e2 (patch) (side-by-side diff) | |
tree | d7b1bee54be6c2e4688458662e1980f820bd396e | |
parent | e2bc13b329b949f8d0f0d9c21903942d3929c4bb (diff) | |
download | opie-ff3af248587695ad5119057edc5e138acf2664e2.zip opie-ff3af248587695ad5119057edc5e138acf2664e2.tar.gz opie-ff3af248587695ad5119057edc5e138acf2664e2.tar.bz2 |
Ok I thought I removed that
ok now finally remove setRow code from todotable.h
This was committed accidently
-rw-r--r-- | core/pim/todo/todotable.cpp | 4 | ||||
-rw-r--r-- | core/pim/todo/todotable.h | 3 |
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 @@ -226,16 +226,17 @@ TodoTable::TodoTable( QWidget *parent, const char *name ) : QTable( 0, 4, parent, name ), // #endif showComp( true ), enablePainting( true ), mCat( 0 ), currFindRow( -2 ), showDeadl( true) { + setNumRows(0); mCat.load( categoryFileName() ); setSorting( TRUE ); setSelectionMode( NoSelection ); setColumnStretchable( 2, TRUE ); setColumnWidth( 0, 20 ); setColumnWidth( 1, 35 ); setLeftMargin( 0 ); @@ -447,16 +448,19 @@ void TodoTable::updateVisible() adjustColumn(2); } int visible = 0; int id = mCat.id( "Todo List", showCat ); 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() ) hide = true; if ( !showCat.isEmpty() ) { if ( showCat == tr( "Unfiled" ) ) { if ( vlCats.count() > 0 ) hide = true; 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 @@ -187,19 +187,16 @@ private: Categories mCat; int currFindRow; bool showDeadl:1; }; 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() ); CheckItem *chk = new CheckItem( this, sortKey ); chk->setChecked( todo->isCompleted() ); ComboItem *cmb = new ComboItem( this, QTableItem::WhenCurrent ); cmb->setText( QString::number( todo->priority() ) ); QString sum = todo->summary(); |