-rw-r--r-- | libkcal/calendarlocal.cpp | 4 | ||||
-rw-r--r-- | libkcal/todo.cpp | 1 |
2 files changed, 5 insertions, 0 deletions
diff --git a/libkcal/calendarlocal.cpp b/libkcal/calendarlocal.cpp index 00a43e5..e75df70 100644 --- a/libkcal/calendarlocal.cpp +++ b/libkcal/calendarlocal.cpp | |||
@@ -81,8 +81,12 @@ bool CalendarLocal::save( const QString &fileName, CalFormat *format ) | |||
81 | } | 81 | } |
82 | 82 | ||
83 | void CalendarLocal::close() | 83 | void CalendarLocal::close() |
84 | { | 84 | { |
85 | |||
86 | Todo * i; | ||
87 | for( i = mTodoList.first(); i; i = mTodoList.next() ) i->setRunning(false); | ||
88 | |||
85 | mEventList.setAutoDelete( true ); | 89 | mEventList.setAutoDelete( true ); |
86 | mTodoList.setAutoDelete( true ); | 90 | mTodoList.setAutoDelete( true ); |
87 | mJournalList.setAutoDelete( false ); | 91 | mJournalList.setAutoDelete( false ); |
88 | 92 | ||
diff --git a/libkcal/todo.cpp b/libkcal/todo.cpp index b89abce..5e6ac22 100644 --- a/libkcal/todo.cpp +++ b/libkcal/todo.cpp | |||
@@ -64,8 +64,9 @@ Todo::~Todo() | |||
64 | void Todo::setRunning( bool run ) | 64 | void Todo::setRunning( bool run ) |
65 | { | 65 | { |
66 | if ( run == mRunning ) | 66 | if ( run == mRunning ) |
67 | return; | 67 | return; |
68 | //qDebug("Todo::setRunning %d ", run); | ||
68 | if ( !mRunSaveTimer ) { | 69 | if ( !mRunSaveTimer ) { |
69 | mRunSaveTimer = new QTimer ( this ); | 70 | mRunSaveTimer = new QTimer ( this ); |
70 | connect ( mRunSaveTimer, SIGNAL( timeout() ), this , SLOT ( saveRunningInfoToFile() ) ); | 71 | connect ( mRunSaveTimer, SIGNAL( timeout() ), this , SLOT ( saveRunningInfoToFile() ) ); |
71 | } | 72 | } |