-rw-r--r-- | korganizer/kofilterview.cpp | 1 | ||||
-rw-r--r-- | libkcal/todo.cpp | 4 | ||||
-rw-r--r-- | libkcal/todo.h | 3 |
3 files changed, 6 insertions, 2 deletions
diff --git a/korganizer/kofilterview.cpp b/korganizer/kofilterview.cpp index 19d731f..9633b2c 100644 --- a/korganizer/kofilterview.cpp +++ b/korganizer/kofilterview.cpp @@ -345,25 +345,24 @@ void KOCalEditView::readConfig() //calb->setMaximumSize( hei*9/10, hei*9/10 ); } ++row; kkf = KOPrefs::instance()->mCalendars.next(); } lab = new QLabel ( "", mw ); mainLayout->addWidget( lab,row,0 ); mw->show(); } void KOCalEditView::addCal() { - qDebug("addcal "); KONewCalPrefs prefs ( this ); if ( ! prefs.exec() ) return; QString name = prefs.calName(); QString file = prefs.calFileName(); QFileInfo fi ( file ); if (!fi.exists() ) { KMessageBox::information( this, i18n("File does not exist!\nNo calendar added!")); return; } KopiCalendarFile * kkf = KOPrefs::instance()->getNewCalendar(); kkf->mName = name; 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 |