Replacement for KDateTime

John Layt jlayt at kde.org
Tue Aug 4 14:48:02 BST 2015


On 4 August 2015 at 10:45, John Layt <jlayt at kde.org> wrote:

> Most of this discussion is very very off-topic, it belongs on the Qt
> development list, can we get back to the main topic of KCalCore and
> QDateTime? I have limited time to spare and I'd rather use it to solve
> the immediate problems that we can fix.

OK, I stole some time from work to look at KCalCore and uses of dateOnly.

There are 16 calls to isDateOnly() or setDateOnly(), 7 of which can be
removed with no effect.

Of the remaining 9, 6 are used internally in private iCal parsing and
while slightly messy can be worked around OK with a flag or enum or
struct.

The remaining 3 uses are inside the IncidenceBase::setDtStart() and
Recurrence::setStartDateTime() public methods, if the passed in
datetime is dateOnly() then the allDay() incidence flag gets set. We
can either add an extra parm to the methods to take a flag, or just
require the calling of setAllDay() in addition. There are about 21
calls to setDtStart() inside KCalCore that would need to be analysed
for impact.

Given the size of the other changes required around KDateTime (time
spec / time zone especially), this part is rather small. The
implications are bigger, as you have to think about all the code
outside KCalCore that calls setDtStart() and dtStart(), but the change
from KDT to QDT will affect them all anyway and we will have masses of
testing to do anyway to cover everything.

John.




More information about the kde-core-devel mailing list