summaryrefslogtreecommitdiffabout
path: root/korganizer/kotodoeditor.cpp
Unidiff
Diffstat (limited to 'korganizer/kotodoeditor.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/kotodoeditor.cpp29
1 files changed, 29 insertions, 0 deletions
diff --git a/korganizer/kotodoeditor.cpp b/korganizer/kotodoeditor.cpp
index 069dda8..9232e09 100644
--- a/korganizer/kotodoeditor.cpp
+++ b/korganizer/kotodoeditor.cpp
@@ -323,2 +323,4 @@ void KOTodoEditor::checkRecurrence()
323 } 323 }
324 if ( to < from )
325 to = from;
324 mRecurrence->setDefaults(from,to,!time); 326 mRecurrence->setDefaults(from,to,!time);
@@ -352,2 +354,29 @@ void KOTodoEditor::writeTodo(Todo *event)
352 mRecurrence->writeEvent(event); 354 mRecurrence->writeEvent(event);
355 event->setRecurrenceID( event->dtStart().addSecs(-1) );
356 event->setRecurDates();
357#if 0
358 bool ok;
359 QDateTime next = event->getNextOccurence( event->dtStart().addSecs(-1), &ok );
360 if ( ok ) {
361 QDateTime from,to;
362 bool time = mGeneral->mTimeButton->isChecked();
363 if ( time ) {
364 to = QDateTime( mGeneral->mDueDateEdit->date(), mGeneral->mDueTimeEdit->getTime() ) ;
365 from = QDateTime( mGeneral->mStartDateEdit->date(),mGeneral->mStartTimeEdit->getTime( )) ;
366 } else {
367 to = QDateTime( mGeneral->mDueDateEdit->date(), QTime( 0,0,0) ) ;
368 from = QDateTime( mGeneral->mStartDateEdit->date(),QTime( 0,0,0) ) ;
369 }
370 if ( to < from )
371 to = from;
372 int secs = from.secsTo( to );
373 event->setRecurrenceID( next );
374 event->setDtStart( next );
375 event->setDtDue( next.addSecs( secs ) );
376 }
377 else {
378 event->setHasRecurrenceID( false );
379 event->recurrence()->unsetRecurs();
380 }
381#endif
353 } else 382 } else