summaryrefslogtreecommitdiffabout
path: root/libkcal
Unidiff
Diffstat (limited to 'libkcal') (more/less context) (show whitespace changes)
-rw-r--r--libkcal/todo.cpp2
-rw-r--r--libkcal/todo.h2
2 files changed, 3 insertions, 1 deletions
diff --git a/libkcal/todo.cpp b/libkcal/todo.cpp
index 62b74f1..9a8b6e4 100644
--- a/libkcal/todo.cpp
+++ b/libkcal/todo.cpp
@@ -94,12 +94,14 @@ void Todo::setRunning( bool run )
94 mRunSaveTimer->stop(); 94 mRunSaveTimer->stop();
95 saveRunningInfoToFile(); 95 saveRunningInfoToFile();
96 } 96 }
97} 97}
98void Todo::saveRunningInfo( QString comment, QDateTime start, QDateTime end ) 98void Todo::saveRunningInfo( QString comment, QDateTime start, QDateTime end )
99{ 99{
100 if ( !mRunning) return;
101 mRunning = false;
100 mRunStart = start; 102 mRunStart = start;
101 mRunEnd = end; 103 mRunEnd = end;
102 saveRunningInfoToFile( comment ); 104 saveRunningInfoToFile( comment );
103} 105}
104void Todo::saveRunningInfoToFile() 106void Todo::saveRunningInfoToFile()
105{ 107{
diff --git a/libkcal/todo.h b/libkcal/todo.h
index 11f848e..425dfad 100644
--- a/libkcal/todo.h
+++ b/libkcal/todo.h
@@ -39,13 +39,12 @@ namespace KCal {
39 Todo(); 39 Todo();
40 Todo(const Todo &); 40 Todo(const Todo &);
41 ~Todo(); 41 ~Todo();
42 typedef ListBase<Todo> List; 42 typedef ListBase<Todo> List;
43 QCString type() const { return "Todo"; } 43 QCString type() const { return "Todo"; }
44 IncTypeID typeID() const { return todoID; } 44 IncTypeID typeID() const { return todoID; }
45 void saveRunningInfo( QString comment, QDateTime start, QDateTime end );
46 45
47 /** Return an exact copy of this todo. */ 46 /** Return an exact copy of this todo. */
48 Incidence *clone(); 47 Incidence *clone();
49 QDateTime getNextAlarmDateTime( bool * ok, int * offset, QDateTime start_dt ) const; 48 QDateTime getNextAlarmDateTime( bool * ok, int * offset, QDateTime start_dt ) const;
50 49
51 /** for setting the todo's due date/time with a QDateTime. */ 50 /** for setting the todo's due date/time with a QDateTime. */
@@ -123,12 +122,13 @@ namespace KCal {
123 bool hasRunningSub(); 122 bool hasRunningSub();
124 void setRunning( bool ); 123 void setRunning( bool );
125 void setRunningFalse( QString ); 124 void setRunningFalse( QString );
126 void stopRunning(); 125 void stopRunning();
127 int runTime(); 126 int runTime();
128 QDateTime runStart () const { return mRunStart;} 127 QDateTime runStart () const { return mRunStart;}
128 void saveRunningInfo( QString comment, QDateTime start, QDateTime end );
129 public slots: 129 public slots:
130 void saveRunningInfoToFile( QString st ); 130 void saveRunningInfoToFile( QString st );
131 void saveRunningInfoToFile( ); 131 void saveRunningInfoToFile( );
132 void saveParents(); 132 void saveParents();
133 private: 133 private:
134 bool mRunning; 134 bool mRunning;