-rw-r--r-- | libkcal/todo.cpp | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/libkcal/todo.cpp b/libkcal/todo.cpp index e98af3c..d062492 100644 --- a/libkcal/todo.cpp +++ b/libkcal/todo.cpp @@ -68,8 +68,16 @@ void Todo::setRunningFalse( QString s ) mRunning = false; mRunSaveTimer->stop(); saveRunningInfoToFile( s ); } +void Todo::stopRunning() +{ + if ( !mRunning ) + return; + if ( mRunSaveTimer ) + mRunSaveTimer->stop(); + mRunning = false; +} void Todo::setRunning( bool run ) { if ( run == mRunning ) return; @@ -94,9 +102,9 @@ void Todo::saveRunningInfoToFile() } void Todo::saveRunningInfoToFile( QString comment ) { //qDebug("Todo::saveRunningInfoToFile() %s", summary().latin1()); - if ( mRunStart.secsTo ( QDateTime::currentDateTime() ) < 30 ) { + if ( mRunStart.secsTo ( QDateTime::currentDateTime() ) < 10 ) { qDebug("Running time < 30 seconds. Skipped. "); return; } QString dir = KGlobalSettings::timeTrackerDir(); |