summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--core/pim/todo/mainwindow.cpp2
-rw-r--r--core/pim/todo/todotable.cpp7
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 )
419 419
420void TodoWindow::showCompleted( bool s ) 420void TodoWindow::showCompleted( bool s )
421{ 421{
422 if ( !table->isUpdatesEnabled() ) 422 if ( !table->isUpdatesEnabled() )
423 return; 423 return;
424 table->setPaintingEnabled( false ); 424 table->setPaintingEnabled( false );
425 table->setShowCompleted( s ); 425 table->setShowCompleted( s );
426 table->setPaintingEnabled( true ); 426 table->setPaintingEnabled( true );
427 mStack->raiseWidget( 1 );
427} 428}
428 429
429void TodoWindow::currentEntryChanged( int r, int ) 430void TodoWindow::currentEntryChanged( int r, int )
430{ 431{
431 if ( r != -1 && table->rowHeight( r ) > 0 ) { 432 if ( r != -1 && table->rowHeight( r ) > 0 ) {
432 editAction->setEnabled( TRUE ); 433 editAction->setEnabled( TRUE );
433 deleteAction->setEnabled( TRUE ); 434 deleteAction->setEnabled( TRUE );
434 duplicateAction->setEnabled( TRUE ); 435 duplicateAction->setEnabled( TRUE );
@@ -540,16 +541,17 @@ void TodoWindow::closeEvent( QCloseEvent *e )
540 else 541 else
541 e->ignore(); 542 e->ignore();
542 } 543 }
543} 544}
544 545
545void TodoWindow::slotFind() 546void TodoWindow::slotFind()
546{ 547{
547 // put everything back to view all for searching... 548 // put everything back to view all for searching...
549 mStack->raiseWidget( 1 );
548 if ( !catMenu->isItemChecked( 0 ) ) 550 if ( !catMenu->isItemChecked( 0 ) )
549 setCategory( 0 ); 551 setCategory( 0 );
550 552
551 FindDialog dlg( "Todo List", this ); 553 FindDialog dlg( "Todo List", this );
552 QObject::connect( &dlg, 554 QObject::connect( &dlg,
553 SIGNAL(signalFindClicked(const QString &, 555 SIGNAL(signalFindClicked(const QString &,
554 bool, bool, int)), 556 bool, bool, int)),
555 table, 557 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 )
593 593
594void TodoTable::loadFile( const QString &/*we use the standard*/ ) 594void TodoTable::loadFile( const QString &/*we use the standard*/ )
595{ 595{
596 596
597 QList<ToDoEvent> list; 597 QList<ToDoEvent> list;
598 ToDoDB todoDB; 598 ToDoDB todoDB;
599 QValueList<ToDoEvent> vaList = todoDB.rawToDos(); 599 QValueList<ToDoEvent> vaList = todoDB.rawToDos();
600 for(QValueList<ToDoEvent>::ConstIterator it = vaList.begin(); it != vaList.end(); ++it ){ 600 for(QValueList<ToDoEvent>::ConstIterator it = vaList.begin(); it != vaList.end(); ++it ){
601 list.append( new ToDoEvent( (*it) ) ); 601 ToDoEvent *event = new ToDoEvent( (*it) );
602 list.append( event );
602 } 603 }
603 vaList.clear(); 604 vaList.clear();
604 // qDebug("parsing done=%d", t.elapsed() ); 605 // qDebug("parsing done=%d", t.elapsed() );
605 if ( list.count() > 0 ) { 606 if ( list.count() > 0 ) {
606 internalAddEntries( list ); 607 internalAddEntries( list );
607 list.clear(); 608 list.clear();
608 } 609 }
609// qDebug("loading done: t=%d", t.elapsed() ); 610// qDebug("loading done: t=%d", t.elapsed() );
@@ -635,18 +636,18 @@ void TodoTable::journalFreeReplaceEntry( const ToDoEvent &todo, int row )
635 delete t; 636 delete t;
636 static_cast<CheckItem*>(item(row, 0))->setChecked( todo.isCompleted() ); 637 static_cast<CheckItem*>(item(row, 0))->setChecked( todo.isCompleted() );
637 static_cast<ComboItem*>(item(row, 1))->setText( QString::number(todo.priority()) ); 638 static_cast<ComboItem*>(item(row, 1))->setText( QString::number(todo.priority()) );
638 item( row, 2 )->setText( strTodo ); 639 item( row, 2 )->setText( strTodo );
639 640
640 if (showDeadl){ 641 if (showDeadl){
641 static_cast<DueTextItem*>(item(row,3))->setToDoEvent(&todo ); 642 static_cast<DueTextItem*>(item(row,3))->setToDoEvent(&todo );
642 } 643 }
643 644 ToDoEvent *ev = new ToDoEvent( todo );
644 todoList.insert( static_cast<CheckItem*>(item(row,0)), new ToDoEvent(todo) ); 645 todoList.insert( static_cast<CheckItem*>(item(row,0)), new ToDoEvent(ev) );
645 } 646 }
646} 647}
647 648
648void TodoTable::journalFreeRemoveEntry( int row ) 649void TodoTable::journalFreeRemoveEntry( int row )
649{ 650{
650 CheckItem *chk; 651 CheckItem *chk;
651 chk = static_cast<CheckItem*>(item(row, 0 )); 652 chk = static_cast<CheckItem*>(item(row, 0 ));
652 if ( !chk ) 653 if ( !chk )