summaryrefslogtreecommitdiff
path: root/core/pim/todo/todotable.cpp
Side-by-side diff
Diffstat (limited to 'core/pim/todo/todotable.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--core/pim/todo/todotable.cpp7
1 files changed, 4 insertions, 3 deletions
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
@@ -595,13 +595,14 @@ 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();
@@ -637,14 +638,14 @@ void TodoTable::journalFreeReplaceEntry( const ToDoEvent &todo, int row )
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;