summaryrefslogtreecommitdiffabout
path: root/libkcal
Side-by-side diff
Diffstat (limited to 'libkcal') (more/less context) (ignore whitespace changes)
-rw-r--r--libkcal/todo.cpp13
-rw-r--r--libkcal/todo.h3
2 files changed, 14 insertions, 2 deletions
diff --git a/libkcal/todo.cpp b/libkcal/todo.cpp
index 002d3f2..f7e38a7 100644
--- a/libkcal/todo.cpp
+++ b/libkcal/todo.cpp
@@ -63,2 +63,10 @@ Todo::~Todo()
+void Todo::setRunningFalse( QString s )
+{
+ if ( ! mRunning )
+ return;
+ mRunning = false;
+ mRunSaveTimer->stop();
+ saveRunningInfoToFile( s );
+}
void Todo::setRunning( bool run )
@@ -82,3 +90,3 @@ void Todo::setRunning( bool run )
-void Todo::saveRunningInfoToFile()
+void Todo::saveRunningInfoToFile( QString comment )
{
@@ -105,2 +113,5 @@ void Todo::saveRunningInfoToFile()
to->setUid( file );
+ if ( !comment.isEmpty() ) {
+ to->setDescription( comment );
+ }
cal.addIncidence( to );
diff --git a/libkcal/todo.h b/libkcal/todo.h
index ec1ffda..a5354ce 100644
--- a/libkcal/todo.h
+++ b/libkcal/todo.h
@@ -122,2 +122,3 @@ namespace KCal {
void setRunning( bool );
+ void setRunningFalse( QString );
int runTime();
@@ -125,3 +126,3 @@ namespace KCal {
public slots:
- void saveRunningInfoToFile();
+ void saveRunningInfoToFile( QString st = QString::null );
void saveParents();