author | zautrix <zautrix> | 2005-04-16 10:17:05 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-04-16 10:17:05 (UTC) |
commit | 6cf5cc7d0b12af6bdc722e469f3f5aa293016c7d (patch) (side-by-side diff) | |
tree | 8b421d5850589c64e6642397819bbf788b6ee1b6 /libkcal/todo.cpp | |
parent | 85bdc33419eef0ffa9f00eb7222944518fe39b6c (diff) | |
download | kdepimpi-6cf5cc7d0b12af6bdc722e469f3f5aa293016c7d.zip kdepimpi-6cf5cc7d0b12af6bdc722e469f3f5aa293016c7d.tar.gz kdepimpi-6cf5cc7d0b12af6bdc722e469f3f5aa293016c7d.tar.bz2 |
fix
-rw-r--r-- | libkcal/todo.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/libkcal/todo.cpp b/libkcal/todo.cpp index 5e6ac22..6a6c137 100644 --- a/libkcal/todo.cpp +++ b/libkcal/todo.cpp @@ -106,64 +106,65 @@ void Todo::saveRunningInfoToFile() cal.addIncidence( to ); ICalFormat format; file = dir +"/" +file +".ics"; format.save( &cal, file ); saveParents(); } void Todo::saveParents() { if (!relatedTo() ) return; Incidence * inc = relatedTo(); if ( inc->type() != "Todo" ) return; Todo* to = (Todo*)inc; bool saveTodo = false; QString file = KGlobalSettings::timeTrackerDir() + "/"+ to->uid() + ".ics"; QFileInfo fi ( file ); if ( fi.exists() ) { if ( fi.lastModified () < to->lastModified ()) saveTodo = true; } else { saveTodo = true; } if ( saveTodo ) { CalendarLocal cal; cal.setTimeZoneId( " 00:00 Europe/London(UTC)" ); Todo * par = (Todo *) to->clone(); cal.addIncidence( par ); ICalFormat format; format.save( &cal, file ); } + to->saveParents(); } int Todo::runTime() { if ( !mRunning ) return 0; return mRunStart.secsTo( QDateTime::currentDateTime() ); } bool Todo::hasRunningSub() { if ( mRunning ) return true; Incidence *aTodo; for (aTodo = mRelations.first(); aTodo; aTodo = mRelations.next()) { if ( ((Todo*)aTodo)->hasRunningSub() ) return true; } return false; } Incidence *Todo::clone() { return new Todo(*this); } bool Todo::contains ( Todo* from ) { if ( !from->summary().isEmpty() ) if ( !summary().startsWith( from->summary() )) return false; if ( from->hasStartDate() ) { if ( !hasStartDate() ) |