-rw-r--r-- | libkcal/incidence.cpp | 4 |
1 files changed, 4 insertions, 0 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 return QDateTime (); } int year = incidenceStart.date().year(); // workaround for bug in recurrence if ( count == 100 || year < 1980 || year > 5000 ) { return QDateTime (); } incidenceStart = incidenceStart.addSecs( 1 ); } } } else { return QDateTime (); } } else { if ( hasStartDate () ) { incidenceStart = dtStart(); + } + if ( type() =="Todo" ) { + if ( ((Todo*)this)->hasDueDate() ) + incidenceStart = ((Todo*)this)->dtDue(); } } if ( incidenceStart > dt ) *ok = true; return incidenceStart; } |