-rw-r--r-- | core/pim/todo/mainwindow.cpp | 2 | ||||
-rw-r--r-- | core/pim/todo/todotable.cpp | 7 |
2 files changed, 6 insertions, 3 deletions
diff --git a/core/pim/todo/mainwindow.cpp b/core/pim/todo/mainwindow.cpp index d3f4cb4..a28fc3e 100644 --- a/core/pim/todo/mainwindow.cpp +++ b/core/pim/todo/mainwindow.cpp @@ -419,16 +419,17 @@ void TodoWindow::slotShowPopup( const QPoint &p ) void TodoWindow::showCompleted( bool s ) { if ( !table->isUpdatesEnabled() ) return; table->setPaintingEnabled( false ); table->setShowCompleted( s ); table->setPaintingEnabled( true ); + mStack->raiseWidget( 1 ); } void TodoWindow::currentEntryChanged( int r, int ) { if ( r != -1 && table->rowHeight( r ) > 0 ) { editAction->setEnabled( TRUE ); deleteAction->setEnabled( TRUE ); duplicateAction->setEnabled( TRUE ); @@ -540,16 +541,17 @@ void TodoWindow::closeEvent( QCloseEvent *e ) else e->ignore(); } } void TodoWindow::slotFind() { // put everything back to view all for searching... + mStack->raiseWidget( 1 ); if ( !catMenu->isItemChecked( 0 ) ) setCategory( 0 ); FindDialog dlg( "Todo List", this ); QObject::connect( &dlg, SIGNAL(signalFindClicked(const QString &, bool, bool, int)), table, diff --git a/core/pim/todo/todotable.cpp b/core/pim/todo/todotable.cpp index 753c036..dc60cc4 100644 --- a/core/pim/todo/todotable.cpp +++ b/core/pim/todo/todotable.cpp @@ -593,17 +593,18 @@ void TodoTable::rowHeightChanged( int row ) void TodoTable::loadFile( const QString &/*we use the standard*/ ) { QList<ToDoEvent> list; ToDoDB todoDB; QValueList<ToDoEvent> vaList = todoDB.rawToDos(); for(QValueList<ToDoEvent>::ConstIterator it = vaList.begin(); it != vaList.end(); ++it ){ - list.append( new ToDoEvent( (*it) ) ); + ToDoEvent *event = new ToDoEvent( (*it) ); + list.append( event ); } vaList.clear(); // qDebug("parsing done=%d", t.elapsed() ); if ( list.count() > 0 ) { internalAddEntries( list ); list.clear(); } // qDebug("loading done: t=%d", t.elapsed() ); @@ -635,18 +636,18 @@ void TodoTable::journalFreeReplaceEntry( const ToDoEvent &todo, int row ) delete t; static_cast<CheckItem*>(item(row, 0))->setChecked( todo.isCompleted() ); static_cast<ComboItem*>(item(row, 1))->setText( QString::number(todo.priority()) ); item( row, 2 )->setText( strTodo ); if (showDeadl){ static_cast<DueTextItem*>(item(row,3))->setToDoEvent(&todo ); } - - todoList.insert( static_cast<CheckItem*>(item(row,0)), new ToDoEvent(todo) ); + ToDoEvent *ev = new ToDoEvent( todo ); + todoList.insert( static_cast<CheckItem*>(item(row,0)), new ToDoEvent(ev) ); } } void TodoTable::journalFreeRemoveEntry( int row ) { CheckItem *chk; chk = static_cast<CheckItem*>(item(row, 0 )); if ( !chk ) |