author | zautrix <zautrix> | 2005-04-15 20:51:58 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-04-15 20:51:58 (UTC) |
commit | 85bdc33419eef0ffa9f00eb7222944518fe39b6c (patch) (side-by-side diff) | |
tree | 57000de41f5e29c5ebd07f3ed2951a7b89730fb1 /libkcal/todo.cpp | |
parent | e1d62b2afac2b625a3e0b8d4df137647de34e04f (diff) | |
download | kdepimpi-85bdc33419eef0ffa9f00eb7222944518fe39b6c.zip kdepimpi-85bdc33419eef0ffa9f00eb7222944518fe39b6c.tar.gz kdepimpi-85bdc33419eef0ffa9f00eb7222944518fe39b6c.tar.bz2 |
fixxx
-rw-r--r-- | libkcal/todo.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/libkcal/todo.cpp b/libkcal/todo.cpp index b89abce..5e6ac22 100644 --- a/libkcal/todo.cpp +++ b/libkcal/todo.cpp @@ -44,48 +44,49 @@ Todo::Todo(): QObject(), Incidence() mRunSaveTimer = 0; } Todo::Todo(const Todo &t) : QObject(),Incidence(t) { mDtDue = t.mDtDue; mHasDueDate = t.mHasDueDate; mCompleted = t.mCompleted; mHasCompletedDate = t.mHasCompletedDate; mPercentComplete = t.mPercentComplete; mRunning = false; mRunSaveTimer = 0; } Todo::~Todo() { setRunning( false ); //qDebug("Todo::~Todo() "); } void Todo::setRunning( bool run ) { if ( run == mRunning ) return; + //qDebug("Todo::setRunning %d ", run); if ( !mRunSaveTimer ) { mRunSaveTimer = new QTimer ( this ); 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() { //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-"; |