summaryrefslogtreecommitdiffabout
path: root/korganizer/kotodoeditor.cpp
authorzautrix <zautrix>2005-02-22 22:28:12 (UTC)
committer zautrix <zautrix>2005-02-22 22:28:12 (UTC)
commit87a2f1a301beae2a8550c340348741c69f0ac1dd (patch) (side-by-side diff)
tree5fd29a75f50da5ef37a01097c12997a18c56543d /korganizer/kotodoeditor.cpp
parent688723b6cd545ad1fa390d98a74680e912578fe8 (diff)
downloadkdepimpi-87a2f1a301beae2a8550c340348741c69f0ac1dd.zip
kdepimpi-87a2f1a301beae2a8550c340348741c69f0ac1dd.tar.gz
kdepimpi-87a2f1a301beae2a8550c340348741c69f0ac1dd.tar.bz2
todo fixes
Diffstat (limited to 'korganizer/kotodoeditor.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/kotodoeditor.cpp35
1 files changed, 8 insertions, 27 deletions
diff --git a/korganizer/kotodoeditor.cpp b/korganizer/kotodoeditor.cpp
index f9f037a..51e2524 100644
--- a/korganizer/kotodoeditor.cpp
+++ b/korganizer/kotodoeditor.cpp
@@ -352,35 +352,16 @@ void KOTodoEditor::writeTodo(Todo *event)
}
if ( mGeneral->mDueCheck->isChecked() && mGeneral->mStartCheck->isChecked()) {
mRecurrence->writeEvent(event);
- event->setRecurrenceID( event->dtStart().addSecs(-1) );
- event->setRecurDates();
-#if 0
- bool ok;
- QDateTime next = event->getNextOccurence( event->dtStart().addSecs(-1), &ok );
- if ( ok ) {
- QDateTime from,to;
- bool time = mGeneral->mTimeButton->isChecked();
- if ( time ) {
- to = QDateTime( mGeneral->mDueDateEdit->date(), mGeneral->mDueTimeEdit->getTime() ) ;
- from = QDateTime( mGeneral->mStartDateEdit->date(),mGeneral->mStartTimeEdit->getTime( )) ;
- } else {
- to = QDateTime( mGeneral->mDueDateEdit->date(), QTime( 0,0,0) ) ;
- from = QDateTime( mGeneral->mStartDateEdit->date(),QTime( 0,0,0) ) ;
- }
- if ( to < from )
- to = from;
- int secs = from.secsTo( to );
- event->setRecurrenceID( next );
- event->setDtStart( next );
- event->setDtDue( next.addSecs( secs ) );
- }
- else {
+ if ( event->doesRecur() ) {
+ event->setRecurrenceID( event->dtStart().addSecs(-1) );
+ event->setRecurDates();
+ } else {
event->setHasRecurrenceID( false );
- event->recurrence()->unsetRecurs();
}
-#endif
- } else
- event->recurrence()->unsetRecurs();
+ } else {
+ event->setHasRecurrenceID( false );
+ event->recurrence()->unsetRecurs();
+ }
}
bool KOTodoEditor::validateInput()