summaryrefslogtreecommitdiffabout
path: root/libkcal
Unidiff
Diffstat (limited to 'libkcal') (more/less context) (show 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
@@ -62,4 +62,12 @@ Todo::~Todo()
62} 62}
63 63
64void Todo::setRunningFalse( QString s )
65{
66 if ( ! mRunning )
67 return;
68 mRunning = false;
69 mRunSaveTimer->stop();
70 saveRunningInfoToFile( s );
71}
64void Todo::setRunning( bool run ) 72void Todo::setRunning( bool run )
65{ 73{
@@ -81,5 +89,5 @@ void Todo::setRunning( bool run )
81} 89}
82 90
83void Todo::saveRunningInfoToFile() 91void Todo::saveRunningInfoToFile( QString comment )
84{ 92{
85 //qDebug("Todo::saveRunningInfoToFile() %s", summary().latin1()); 93 //qDebug("Todo::saveRunningInfoToFile() %s", summary().latin1());
@@ -104,4 +112,7 @@ void Todo::saveRunningInfoToFile()
104 to->setHasDueDate( true ); 112 to->setHasDueDate( true );
105 to->setUid( file ); 113 to->setUid( file );
114 if ( !comment.isEmpty() ) {
115 to->setDescription( comment );
116 }
106 cal.addIncidence( to ); 117 cal.addIncidence( to );
107 ICalFormat format; 118 ICalFormat format;
diff --git a/libkcal/todo.h b/libkcal/todo.h
index ec1ffda..a5354ce 100644
--- a/libkcal/todo.h
+++ b/libkcal/todo.h
@@ -121,8 +121,9 @@ namespace KCal {
121 bool hasRunningSub(); 121 bool hasRunningSub();
122 void setRunning( bool ); 122 void setRunning( bool );
123 void setRunningFalse( QString );
123 int runTime(); 124 int runTime();
124 QDateTime runStart () const { return mRunStart;} 125 QDateTime runStart () const { return mRunStart;}
125 public slots: 126 public slots:
126 void saveRunningInfoToFile(); 127 void saveRunningInfoToFile( QString st = QString::null );
127 void saveParents(); 128 void saveParents();
128 private: 129 private: