summaryrefslogtreecommitdiffabout
path: root/libkcal/todo.cpp
Side-by-side diff
Diffstat (limited to 'libkcal/todo.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--libkcal/todo.cpp13
1 files changed, 12 insertions, 1 deletions
diff --git a/libkcal/todo.cpp b/libkcal/todo.cpp
index 002d3f2..f7e38a7 100644
--- a/libkcal/todo.cpp
+++ b/libkcal/todo.cpp
@@ -61,6 +61,14 @@ Todo::~Todo()
//qDebug("Todo::~Todo() ");
}
+void Todo::setRunningFalse( QString s )
+{
+ if ( ! mRunning )
+ return;
+ mRunning = false;
+ mRunSaveTimer->stop();
+ saveRunningInfoToFile( s );
+}
void Todo::setRunning( bool run )
{
if ( run == mRunning )
@@ -80,7 +88,7 @@ void Todo::setRunning( bool run )
}
}
-void Todo::saveRunningInfoToFile()
+void Todo::saveRunningInfoToFile( QString comment )
{
//qDebug("Todo::saveRunningInfoToFile() %s", summary().latin1());
if ( mRunStart.secsTo ( QDateTime::currentDateTime() ) < 30 ) {
@@ -103,6 +111,9 @@ void Todo::saveRunningInfoToFile()
to->setDtDue( QDateTime::currentDateTime() );
to->setHasDueDate( true );
to->setUid( file );
+ if ( !comment.isEmpty() ) {
+ to->setDescription( comment );
+ }
cal.addIncidence( to );
ICalFormat format;
file = dir +"/" +file +".ics";