-rw-r--r-- | libkcal/todo.cpp | 10 | ||||
-rw-r--r-- | libkcal/todo.h | 1 |
2 files changed, 10 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 | |||
@@ -69,6 +69,14 @@ void Todo::setRunningFalse( QString s ) | |||
69 | mRunSaveTimer->stop(); | 69 | mRunSaveTimer->stop(); |
70 | saveRunningInfoToFile( s ); | 70 | saveRunningInfoToFile( s ); |
71 | } | 71 | } |
72 | void Todo::stopRunning() | ||
73 | { | ||
74 | if ( !mRunning ) | ||
75 | return; | ||
76 | if ( mRunSaveTimer ) | ||
77 | mRunSaveTimer->stop(); | ||
78 | mRunning = false; | ||
79 | } | ||
72 | void Todo::setRunning( bool run ) | 80 | void Todo::setRunning( bool run ) |
73 | { | 81 | { |
74 | if ( run == mRunning ) | 82 | if ( run == mRunning ) |
@@ -95,7 +103,7 @@ void Todo::saveRunningInfoToFile() | |||
95 | void Todo::saveRunningInfoToFile( QString comment ) | 103 | void Todo::saveRunningInfoToFile( QString comment ) |
96 | { | 104 | { |
97 | //qDebug("Todo::saveRunningInfoToFile() %s", summary().latin1()); | 105 | //qDebug("Todo::saveRunningInfoToFile() %s", summary().latin1()); |
98 | if ( mRunStart.secsTo ( QDateTime::currentDateTime() ) < 30 ) { | 106 | if ( mRunStart.secsTo ( QDateTime::currentDateTime() ) < 10 ) { |
99 | qDebug("Running time < 30 seconds. Skipped. "); | 107 | qDebug("Running time < 30 seconds. Skipped. "); |
100 | return; | 108 | return; |
101 | } | 109 | } |
diff --git a/libkcal/todo.h b/libkcal/todo.h index 6fc4d4b..42db025 100644 --- a/libkcal/todo.h +++ b/libkcal/todo.h | |||
@@ -122,6 +122,7 @@ namespace KCal { | |||
122 | bool hasRunningSub(); | 122 | bool hasRunningSub(); |
123 | void setRunning( bool ); | 123 | void setRunning( bool ); |
124 | void setRunningFalse( QString ); | 124 | void setRunningFalse( QString ); |
125 | void stopRunning(); | ||
125 | int runTime(); | 126 | int runTime(); |
126 | QDateTime runStart () const { return mRunStart;} | 127 | QDateTime runStart () const { return mRunStart;} |
127 | public slots: | 128 | public slots: |