From 8fbdf5d2b0ee1e1496cb856e0ead37c668066353 Mon Sep 17 00:00:00 2001 From: zautrix Date: Thu, 28 Apr 2005 09:08:21 +0000 Subject: added comment for todo --- (limited to 'libkcal/todo.cpp') 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"; -- cgit v0.9.0.2