[Bug 185870] New: Calculation of recurrent start dates is wrong
Thomas Förster
t.foerster at biologie.hu-berlin.de
Sun Mar 1 12:13:56 GMT 2009
https://bugs.kde.org/show_bug.cgi?id=185870
Summary: Calculation of recurrent start dates is wrong
Product: kdepimlibs
Version: 4.2
Platform: Gentoo Packages
OS/Version: Linux
Status: UNCONFIRMED
Severity: normal
Priority: NOR
Component: kcal
AssignedTo: kdepim-bugs at kde.org
ReportedBy: t.foerster at biologie.hu-berlin.de
Version: (using KDE 4.2.0)
OS: Linux
Installed from: Gentoo Packages
Looking at the implementation of KCal::Todo::dtStart(bool) there seems to be a
bug resulting in ignoring the bool flag.
00280 KDateTime Todo::dtStart( bool first ) const
00281 {
00282 if ( !hasStartDate() ) {
00283 return KDateTime();
00284 }
00285 if ( recurs() && !first ) {
00286 return d->mDtRecurrence.addDays( dtDue( first ).daysTo(
IncidenceBase::dtStart() ) );
00287 } else {
00288 return IncidenceBase::dtStart();
00289 }
00290 }
If first is false, line 286 reduces to:
return d->mDtRecurrence.addDays( dtDue( false ).daysTo( dtStart( true ) ) );
d->mDtRecurrence and dtDue(false) are the same date (todo.cpp:171) so the whole
function reduces to dtStart(true).
line 286 should be changed to ... addDays( dtDue(true).daysTo ...
--
Configure bugmail: https://bugs.kde.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the Kdepim-bugs
mailing list