summaryrefslogtreecommitdiffabout
path: root/libkcal
authorzautrix <zautrix>2005-06-17 09:29:18 (UTC)
committer zautrix <zautrix>2005-06-17 09:29:18 (UTC)
commit160b471e4d254fd45dbbd161178de15a14163a0c (patch) (side-by-side diff)
tree149a5bf6ef1eb0399c46c928a53d31fa298ac383 /libkcal
parentcd71ce2dd43e4cca3b3da3f599616e7b1b6b8deb (diff)
downloadkdepimpi-160b471e4d254fd45dbbd161178de15a14163a0c.zip
kdepimpi-160b471e4d254fd45dbbd161178de15a14163a0c.tar.gz
kdepimpi-160b471e4d254fd45dbbd161178de15a14163a0c.tar.bz2
fixxx
Diffstat (limited to 'libkcal') (more/less context) (ignore 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 )
mRunSaveTimer->stop();
saveRunningInfoToFile();
}
}
void Todo::saveRunningInfo( QString comment, QDateTime start, QDateTime end )
{
+ if ( !mRunning) return;
+ mRunning = false;
mRunStart = start;
mRunEnd = end;
saveRunningInfoToFile( comment );
}
void Todo::saveRunningInfoToFile()
{
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 {
Todo();
Todo(const Todo &);
~Todo();
typedef ListBase<Todo> List;
QCString type() const { return "Todo"; }
IncTypeID typeID() const { return todoID; }
- void saveRunningInfo( QString comment, QDateTime start, QDateTime end );
/** Return an exact copy of this todo. */
Incidence *clone();
QDateTime getNextAlarmDateTime( bool * ok, int * offset, QDateTime start_dt ) const;
/** for setting the todo's due date/time with a QDateTime. */
@@ -123,12 +122,13 @@ namespace KCal {
bool hasRunningSub();
void setRunning( bool );
void setRunningFalse( QString );
void stopRunning();
int runTime();
QDateTime runStart () const { return mRunStart;}
+ void saveRunningInfo( QString comment, QDateTime start, QDateTime end );
public slots:
void saveRunningInfoToFile( QString st );
void saveRunningInfoToFile( );
void saveParents();
private:
bool mRunning;