[Panel-devel] data engine config

Aaron J. Seigo aseigo at kde.org
Tue Jan 1 09:31:42 CET 2008


On Thursday 27 December 2007, Chani wrote:
> timing bugfix attached. since QTime::currentTime().msec() is a number <
> 1000 and there is no function that provides the number of milliseconds
> since midnight, I decided it was more sensible to just store the QTime and
> take advantage of its methods designed for doing this stuff.
>
> things I'm unsure about:
> -shouldn't the timestamp be updated when the data is cleared?

yes, probably.

> -should the timestamp be initialized to the current time instead of left
> null (which behaves mostly like midnight)? just a nitpick

not sure it matters really.

> -this does *not* fix the issues with time difference > 24 hours, or
> daylight savings weirdness. perhaps we should just go straight to QDateTime
> instead - but then we'd get seconds, not milliseconds.

i don't we don't that sort of resolution (daylight savings, times of >24 hrs, 
etc) but we certainly do need sub-second timings (e.g. clocks).

i see you already committed this. unfortunately, you removed a block of code 
that shouldn't have been. in particular:

-    if (msec < d->updateTs) {
-        // we wrapped over midnight here, so return the current
-        // msec's plus the number of msec left in the previous day.
-        // 86400000 is the # of msec in a day
-        //
-        // yes, we assume we don't wrap more than one day here.
-        return msec + (86400000 - d->updateTs);
-    }

that check still needs to happen, for obvious reasons. pelase add it back.

-- 
Aaron J. Seigo
humru othro a kohnu se
GPG Fingerprint: 8B8B 2209 0C6F 7C47 B1EA  EE75 D6B7 2EB1 A7F1 DB43

KDE core developer sponsored by Trolltech
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://mail.kde.org/pipermail/panel-devel/attachments/20080101/686008fb/attachment.pgp 


More information about the Panel-devel mailing list