From e4d0908ec054b71a9b97e9c35efbd5a697d0b58d Mon Sep 17 00:00:00 2001 From: zecke Date: Mon, 29 Apr 2002 10:17:33 +0000 Subject: 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 --- (limited to 'core/pim/todo') 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 @@ -372,7 +372,7 @@ void TodoWindow::slotEdit() } ToDoEvent todo = table->currentEntry(); - + qWarning("slotEdit" ); NewTaskDialog e( todo, this, 0, TRUE ); e.setCaption( tr( "Edit Task" ) ); @@ -382,6 +382,7 @@ void TodoWindow::slotEdit() int ret = e.exec(); if ( ret == QDialog::Accepted ) { + qWarning("Replacing now" ); table->setPaintingEnabled( false ); todo = e.todoEntry(); table->replaceCurrentEntry( todo ); 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 @@ -641,8 +641,7 @@ void TodoTable::journalFreeReplaceEntry( const ToDoEvent &todo, int row ) if (showDeadl){ static_cast(item(row,3))->setToDoEvent(&todo ); } - ToDoEvent *ev = new ToDoEvent( todo ); - todoList.insert( static_cast(item(row,0)), new ToDoEvent(ev) ); + todoList.insert( static_cast(item(row,0)), new ToDoEvent(todo) ); } } -- cgit v0.9.0.2