summaryrefslogtreecommitdiffabout
path: root/libkcal/incidence.cpp
Unidiff
Diffstat (limited to 'libkcal/incidence.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--libkcal/incidence.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/libkcal/incidence.cpp b/libkcal/incidence.cpp
index 28402ae..f9e1e9e 100644
--- a/libkcal/incidence.cpp
+++ b/libkcal/incidence.cpp
@@ -589,13 +589,13 @@ QDateTime Incidence::getNextOccurence( const QDateTime& dt, bool* ok ) const
589 } else { 589 } else {
590 if ( last ) { // no alarm on last recurrence 590 if ( last ) { // no alarm on last recurrence
591 return QDateTime (); 591 return QDateTime ();
592 } 592 }
593 int year = incidenceStart.date().year(); 593 int year = incidenceStart.date().year();
594 // workaround for bug in recurrence 594 // workaround for bug in recurrence
595 if ( count == 100 || year < 1980 || year > 5000 ) { 595 if ( count == 100 || year < 1000 || year > 5000 ) {
596 return QDateTime (); 596 return QDateTime ();
597 } 597 }
598 incidenceStart = incidenceStart.addSecs( 1 ); 598 incidenceStart = incidenceStart.addSecs( 1 );
599 } 599 }
600 } 600 }
601 } else { 601 } else {
@@ -605,13 +605,12 @@ QDateTime Incidence::getNextOccurence( const QDateTime& dt, bool* ok ) const
605 if ( hasStartDate () ) { 605 if ( hasStartDate () ) {
606 incidenceStart = dtStart(); 606 incidenceStart = dtStart();
607 } 607 }
608 if ( type() =="Todo" ) { 608 if ( type() =="Todo" ) {
609 if ( ((Todo*)this)->hasDueDate() ) 609 if ( ((Todo*)this)->hasDueDate() )
610 incidenceStart = ((Todo*)this)->dtDue(); 610 incidenceStart = ((Todo*)this)->dtDue();
611
612 } 611 }
613 } 612 }
614 if ( incidenceStart > dt ) 613 if ( incidenceStart > dt )
615 *ok = true; 614 *ok = true;
616 return incidenceStart; 615 return incidenceStart;
617} 616}