summaryrefslogtreecommitdiff
authorzecke <zecke>2002-04-29 10:17:33 (UTC)
committer zecke <zecke>2002-04-29 10:17:33 (UTC)
commite4d0908ec054b71a9b97e9c35efbd5a697d0b58d (patch) (unidiff)
tree1c483d82624c8af936af99399db9c7ea7922c90c
parent9e2a233287309bdb6bcb228aaf075f8c14a1a687 (diff)
downloadopie-e4d0908ec054b71a9b97e9c35efbd5a697d0b58d.zip
opie-e4d0908ec054b71a9b97e9c35efbd5a697d0b58d.tar.gz
opie-e4d0908ec054b71a9b97e9c35efbd5a697d0b58d.tar.bz2
Create an Event. And modify it and try to view it
The Event gets "losed" this was reported by Stefan Eilers Currently I'm searching my brown paper bag but I just wanted to say I fixed it it was introduced with the change from Task-> ToDoDB
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--core/pim/todo/mainwindow.cpp3
-rw-r--r--core/pim/todo/todotable.cpp3
2 files changed, 3 insertions, 3 deletions
diff --git a/core/pim/todo/mainwindow.cpp b/core/pim/todo/mainwindow.cpp
index a28fc3e..294f37c 100644
--- a/core/pim/todo/mainwindow.cpp
+++ b/core/pim/todo/mainwindow.cpp
@@ -367,26 +367,27 @@ void TodoWindow::slotEdit()
367{ 367{
368 if(syncing) { 368 if(syncing) {
369 QMessageBox::warning(this, tr("Todo"), 369 QMessageBox::warning(this, tr("Todo"),
370 tr("Can not edit data, currently syncing")); 370 tr("Can not edit data, currently syncing"));
371 return; 371 return;
372 } 372 }
373 373
374 ToDoEvent todo = table->currentEntry(); 374 ToDoEvent todo = table->currentEntry();
375 375 qWarning("slotEdit" );
376 NewTaskDialog e( todo, this, 0, TRUE ); 376 NewTaskDialog e( todo, this, 0, TRUE );
377 e.setCaption( tr( "Edit Task" ) ); 377 e.setCaption( tr( "Edit Task" ) );
378 378
379#if defined(Q_WS_QWS) || defined(_WS_QWS_) 379#if defined(Q_WS_QWS) || defined(_WS_QWS_)
380 e.showMaximized(); 380 e.showMaximized();
381#endif 381#endif
382 int ret = e.exec(); 382 int ret = e.exec();
383 383
384 if ( ret == QDialog::Accepted ) { 384 if ( ret == QDialog::Accepted ) {
385 qWarning("Replacing now" );
385 table->setPaintingEnabled( false ); 386 table->setPaintingEnabled( false );
386 todo = e.todoEntry(); 387 todo = e.todoEntry();
387 table->replaceCurrentEntry( todo ); 388 table->replaceCurrentEntry( todo );
388 table->setPaintingEnabled( true ); 389 table->setPaintingEnabled( true );
389 } 390 }
390 populateCategories(); 391 populateCategories();
391 mStack->raiseWidget( 1 ); 392 mStack->raiseWidget( 1 );
392} 393}
diff --git a/core/pim/todo/todotable.cpp b/core/pim/todo/todotable.cpp
index dc60cc4..208a084 100644
--- a/core/pim/todo/todotable.cpp
+++ b/core/pim/todo/todotable.cpp
@@ -636,18 +636,17 @@ void TodoTable::journalFreeReplaceEntry( const ToDoEvent &todo, int row )
636 delete t; 636 delete t;
637 static_cast<CheckItem*>(item(row, 0))->setChecked( todo.isCompleted() ); 637 static_cast<CheckItem*>(item(row, 0))->setChecked( todo.isCompleted() );
638 static_cast<ComboItem*>(item(row, 1))->setText( QString::number(todo.priority()) ); 638 static_cast<ComboItem*>(item(row, 1))->setText( QString::number(todo.priority()) );
639 item( row, 2 )->setText( strTodo ); 639 item( row, 2 )->setText( strTodo );
640 640
641 if (showDeadl){ 641 if (showDeadl){
642 static_cast<DueTextItem*>(item(row,3))->setToDoEvent(&todo ); 642 static_cast<DueTextItem*>(item(row,3))->setToDoEvent(&todo );
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) );
646 } 645 }
647} 646}
648 647
649void TodoTable::journalFreeRemoveEntry( int row ) 648void TodoTable::journalFreeRemoveEntry( int row )
650{ 649{
651 CheckItem *chk; 650 CheckItem *chk;
652 chk = static_cast<CheckItem*>(item(row, 0 )); 651 chk = static_cast<CheckItem*>(item(row, 0 ));
653 if ( !chk ) 652 if ( !chk )