author | zautrix <zautrix> | 2005-02-13 17:05:02 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-02-13 17:05:02 (UTC) |
commit | 293271fe9e6a9061da329183f8f488d79580f7da (patch) (unidiff) | |
tree | 3a0234eabdf58440a484e960b5eef912a63d0056 /libkcal/incidence.cpp | |
parent | 0a33f91e166747406ca2ccb5819881feeecfdb40 (diff) | |
download | kdepimpi-293271fe9e6a9061da329183f8f488d79580f7da.zip kdepimpi-293271fe9e6a9061da329183f8f488d79580f7da.tar.gz kdepimpi-293271fe9e6a9061da329183f8f488d79580f7da.tar.bz2 |
todo rec fixes
-rw-r--r-- | libkcal/incidence.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/libkcal/incidence.cpp b/libkcal/incidence.cpp index dbc159c..0684af2 100644 --- a/libkcal/incidence.cpp +++ b/libkcal/incidence.cpp | |||
@@ -626,24 +626,33 @@ QDateTime Incidence::getNextOccurence( const QDateTime& dt, bool* ok ) const | |||
626 | int year = incidenceStart.date().year(); | 626 | int year = incidenceStart.date().year(); |
627 | // workaround for bug in recurrence | 627 | // workaround for bug in recurrence |
628 | if ( count == 100 || year < 1000 || year > 5000 ) { | 628 | if ( count == 100 || year < 1000 || year > 5000 ) { |
629 | return QDateTime (); | 629 | return QDateTime (); |
630 | } | 630 | } |
631 | incidenceStart = incidenceStart.addSecs( 1 ); | 631 | incidenceStart = incidenceStart.addSecs( 1 ); |
632 | } | 632 | } |
633 | } | 633 | } |
634 | } else { | 634 | } else { |
635 | return QDateTime (); | 635 | return QDateTime (); |
636 | } | 636 | } |
637 | } else { | 637 | } else { |
638 | if ( hasStartDate () ) { | 638 | if ( hasStartDate () ) { |
639 | incidenceStart = dtStart(); | 639 | incidenceStart = dtStart(); |
640 | } | 640 | } |
641 | if ( type() =="Todo" ) { | 641 | if ( type() =="Todo" ) { |
642 | if ( ((Todo*)this)->hasDueDate() ) | 642 | if ( ((Todo*)this)->hasDueDate() ) |
643 | incidenceStart = ((Todo*)this)->dtDue(); | 643 | incidenceStart = ((Todo*)this)->dtDue(); |
644 | } | 644 | } |
645 | } | 645 | } |
646 | if ( incidenceStart > dt ) | 646 | if ( incidenceStart > dt ) |
647 | *ok = true; | 647 | *ok = true; |
648 | return incidenceStart; | 648 | return incidenceStart; |
649 | } | 649 | } |
650 | QDateTime Incidence::dtStart() const | ||
651 | { | ||
652 | if ( doesRecur() ) { | ||
653 | if ( type() == "Todo" ) { | ||
654 | ((Todo*)this)->checkSetCompletedFalse(); | ||
655 | } | ||
656 | } | ||
657 | return mDtStart; | ||
658 | } | ||