author | zautrix <zautrix> | 2005-06-27 04:48:41 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-06-27 04:48:41 (UTC) |
commit | 9b2bf31715226dfa8210f31843616a04f810f012 (patch) (side-by-side diff) | |
tree | b502c4a379b26f74621ba8fabb59fcb53f5a5679 /libkcal | |
parent | 2e566a307bb50ac595fe729ebed0f5336f2af5a8 (diff) | |
download | kdepimpi-9b2bf31715226dfa8210f31843616a04f810f012.zip kdepimpi-9b2bf31715226dfa8210f31843616a04f810f012.tar.gz kdepimpi-9b2bf31715226dfa8210f31843616a04f810f012.tar.bz2 |
strat stop tod fixes
-rw-r--r-- | libkcal/calendar.h | 1 | ||||
-rw-r--r-- | libkcal/calendarlocal.cpp | 6 | ||||
-rw-r--r-- | libkcal/calendarlocal.h | 1 | ||||
-rw-r--r-- | libkcal/todo.cpp | 4 |
4 files changed, 10 insertions, 2 deletions
diff --git a/libkcal/calendar.h b/libkcal/calendar.h index 3b7b183..2efa355 100644 --- a/libkcal/calendar.h +++ b/libkcal/calendar.h @@ -78,4 +78,5 @@ public: virtual bool addCalendarFile( QString name, int id ) = 0; virtual void setSyncEventsReadOnly() = 0; + virtual void stopAllTodos() = 0; /** diff --git a/libkcal/calendarlocal.cpp b/libkcal/calendarlocal.cpp index 8c4dde1..18f1af8 100644 --- a/libkcal/calendarlocal.cpp +++ b/libkcal/calendarlocal.cpp @@ -148,4 +148,10 @@ bool CalendarLocal::save( const QString &fileName, CalFormat *format ) } +void CalendarLocal::stopAllTodos() +{ + for ( Todo *it = mTodoList.first(); it; it = mTodoList.next() ) + it->setRunning( false ); + +} void CalendarLocal::close() { diff --git a/libkcal/calendarlocal.h b/libkcal/calendarlocal.h index 0286b48..d32597f 100644 --- a/libkcal/calendarlocal.h +++ b/libkcal/calendarlocal.h @@ -47,4 +47,5 @@ class CalendarLocal : public Calendar bool addCalendarFile( QString name, int id ); void setSyncEventsReadOnly(); + void stopAllTodos(); /** Loads a calendar on disk in vCalendar or iCalendar format into the current diff --git a/libkcal/todo.cpp b/libkcal/todo.cpp index 9a8b6e4..5260051 100644 --- a/libkcal/todo.cpp +++ b/libkcal/todo.cpp @@ -112,6 +112,6 @@ void Todo::saveRunningInfoToFile( QString comment ) { //qDebug("Todo::saveRunningInfoToFile() %s", summary().latin1()); - if ( mRunStart.secsTo ( QDateTime::currentDateTime() ) < 10 ) { - qDebug("Running time < 30 seconds. Skipped. "); + if ( mRunStart.secsTo ( mRunEnd) < 15 ) { + qDebug("Running time < 15 seconds. Skipped. "); return; } |