summaryrefslogtreecommitdiffabout
path: root/libkcal/incidence.cpp
authorzautrix <zautrix>2005-01-31 16:29:05 (UTC)
committer zautrix <zautrix>2005-01-31 16:29:05 (UTC)
commitec037c4616342c1b3976c55db98b775f48e0d455 (patch) (unidiff)
tree9d568c8f6ad6005f822c12644596b7a553837c7f /libkcal/incidence.cpp
parent5d52c81be9b43887c13f8534a04164d3b44b821f (diff)
downloadkdepimpi-ec037c4616342c1b3976c55db98b775f48e0d455.zip
kdepimpi-ec037c4616342c1b3976c55db98b775f48e0d455.tar.gz
kdepimpi-ec037c4616342c1b3976c55db98b775f48e0d455.tar.bz2
fix
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
@@ -583,35 +583,34 @@ QDateTime Incidence::getNextOccurence( const QDateTime& dt, bool* ok ) const
583 if ( !last ) { 583 if ( !last ) {
584 while ( !last ) { 584 while ( !last ) {
585 ++count; 585 ++count;
586 incidenceStart = recurrence()->getNextDateTime( incidenceStart, &last ); 586 incidenceStart = recurrence()->getNextDateTime( incidenceStart, &last );
587 if ( recursOn( incidenceStart.date() ) ) { 587 if ( recursOn( incidenceStart.date() ) ) {
588 last = true; // exit while llop 588 last = true; // exit while llop
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 {
602 return QDateTime (); 602 return QDateTime ();
603 } 603 }
604 } else { 604 } else {
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}