author | zautrix <zautrix> | 2005-06-13 23:07:29 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-06-13 23:07:29 (UTC) |
commit | b3743f5abe0a95c9ffeadf6701c9943f604febd6 (patch) (side-by-side diff) | |
tree | ca7b4fa180795d5d6fb7b212eea74e0ddf2e73ad /libkcal | |
parent | 35d40d945aed8c9e7c3389182014a2d99edb5254 (diff) | |
download | kdepimpi-b3743f5abe0a95c9ffeadf6701c9943f604febd6.zip kdepimpi-b3743f5abe0a95c9ffeadf6701c9943f604febd6.tar.gz kdepimpi-b3743f5abe0a95c9ffeadf6701c9943f604febd6.tar.bz2 |
fixxx
-rw-r--r-- | libkcal/todo.cpp | 4 | ||||
-rw-r--r-- | libkcal/todo.h | 3 |
2 files changed, 6 insertions, 1 deletions
diff --git a/libkcal/todo.cpp b/libkcal/todo.cpp index 42274ff..e98af3c 100644 --- a/libkcal/todo.cpp +++ b/libkcal/todo.cpp @@ -79,24 +79,28 @@ void Todo::setRunning( bool run ) connect ( mRunSaveTimer, SIGNAL( timeout() ), this , SLOT ( saveRunningInfoToFile() ) ); } mRunning = run; if ( mRunning ) { mRunSaveTimer->start( 1000 * 60 * 5 ); // 5 min mRunStart = QDateTime::currentDateTime(); } else { mRunSaveTimer->stop(); saveRunningInfoToFile(); } } +void Todo::saveRunningInfoToFile() +{ + saveRunningInfoToFile( QString::null ); +} void Todo::saveRunningInfoToFile( QString comment ) { //qDebug("Todo::saveRunningInfoToFile() %s", summary().latin1()); if ( mRunStart.secsTo ( QDateTime::currentDateTime() ) < 30 ) { qDebug("Running time < 30 seconds. Skipped. "); return; } QString dir = KGlobalSettings::timeTrackerDir(); //qDebug("%s ", dir.latin1()); QString file = "%1%2%3-%4%5%6-"; file = file.arg( mRunStart.date().year(), 4).arg( mRunStart.date().month(),2 ).arg( mRunStart.date().day(), 2 ).arg( mRunStart.time().hour(),2 ).arg( mRunStart.time().minute(),2 ).arg( mRunStart.time().second(),2 ); file.replace ( QRegExp (" "), "0" ); diff --git a/libkcal/todo.h b/libkcal/todo.h index 501c2ba..6fc4d4b 100644 --- a/libkcal/todo.h +++ b/libkcal/todo.h @@ -116,25 +116,26 @@ namespace KCal { /** Return true, if todo has a date associated with completion */ bool hasCompletedDate() const; bool contains ( Todo*); void checkSetCompletedFalse(); bool setRecurDates(); bool isRunning() {return mRunning;} bool hasRunningSub(); void setRunning( bool ); void setRunningFalse( QString ); int runTime(); QDateTime runStart () const { return mRunStart;} public slots: - void saveRunningInfoToFile( QString st = QString::null ); + void saveRunningInfoToFile( QString st ); + void saveRunningInfoToFile( ); void saveParents(); private: bool mRunning; QTimer * mRunSaveTimer; QDateTime mRunStart; bool accept(Visitor &v) { return v.visit(this); } QDateTime mDtDue; // due date of todo bool mHasDueDate; // if todo has associated due date // int mStatus; // confirmed/delegated/tentative/etc |