author | zautrix <zautrix> | 2004-09-20 15:25:04 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2004-09-20 15:25:04 (UTC) |
commit | 6b6a28919908134ccbb3badcb24c2dcae0d426a5 (patch) (unidiff) | |
tree | 72b3f69fa1f40bd4cfbd945d9f41699229604ae6 /libkcal/incidence.cpp | |
parent | f222bd1339ac8323e3c99af84a6f83c21cacb8f8 (diff) | |
download | kdepimpi-6b6a28919908134ccbb3badcb24c2dcae0d426a5.zip kdepimpi-6b6a28919908134ccbb3badcb24c2dcae0d426a5.tar.gz kdepimpi-6b6a28919908134ccbb3badcb24c2dcae0d426a5.tar.bz2 |
Several bugfixes
-rw-r--r-- | libkcal/incidence.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/libkcal/incidence.cpp b/libkcal/incidence.cpp index 56c9801..55ac6d4 100644 --- a/libkcal/incidence.cpp +++ b/libkcal/incidence.cpp | |||
@@ -577,23 +577,27 @@ QDateTime Incidence::getNextOccurence( const QDateTime& dt, bool* ok ) const | |||
577 | return QDateTime (); | 577 | return QDateTime (); |
578 | } | 578 | } |
579 | int year = incidenceStart.date().year(); | 579 | int year = incidenceStart.date().year(); |
580 | // workaround for bug in recurrence | 580 | // workaround for bug in recurrence |
581 | if ( count == 100 || year < 1980 || year > 5000 ) { | 581 | if ( count == 100 || year < 1980 || year > 5000 ) { |
582 | return QDateTime (); | 582 | return QDateTime (); |
583 | } | 583 | } |
584 | incidenceStart = incidenceStart.addSecs( 1 ); | 584 | incidenceStart = incidenceStart.addSecs( 1 ); |
585 | } | 585 | } |
586 | } | 586 | } |
587 | } else { | 587 | } else { |
588 | return QDateTime (); | 588 | return QDateTime (); |
589 | } | 589 | } |
590 | } else { | 590 | } else { |
591 | if ( hasStartDate () ) { | 591 | if ( hasStartDate () ) { |
592 | incidenceStart = dtStart(); | 592 | incidenceStart = dtStart(); |
593 | 593 | } | |
594 | } | 594 | if ( type() =="Todo" ) { |
595 | if ( ((Todo*)this)->hasDueDate() ) | ||
596 | incidenceStart = ((Todo*)this)->dtDue(); | ||
597 | |||
598 | } | ||
595 | } | 599 | } |
596 | if ( incidenceStart > dt ) | 600 | if ( incidenceStart > dt ) |
597 | *ok = true; | 601 | *ok = true; |
598 | return incidenceStart; | 602 | return incidenceStart; |
599 | } | 603 | } |