New methods for KTimeZone
Thiago Macieira
thiago at kde.org
Sat Jun 9 16:00:21 BST 2007
David Jarvie wrote:
>I'd like to add a couple of new methods to KTimeZone on Monday, and
> provide additional optional parameters for a couple of other methods.
> Their purpose is to fetch details of time zone daylight savings
> transitions during specified time intervals. There is a need for this
> in reading iCalendar data in kdepim, but they are generally applicable
> so it seems sensible to add them to kdelibs before the API freeze.
>
>Patch attached - and I'll also add test code. Any objections?
Hijacking your thread:
Can we get rid of these:
(kdecore/date/kdatetime.cpp:201 and 202)
const KDateTime::Spec KDateTime::Spec::UTC =
KDateTime::Spec(KDateTime::UTC);
const KDateTime::Spec KDateTime::Spec::ClockTime =
KDateTime::Spec(KDateTime::ClockTime);
They are non-POD global statics. That we can't have. Please either make
them enums or functions or POD objects.
Also, the following two functions:
KDateTime::Spec KDateTime::Spec::LocalZone() {
return Spec(KDateTime::LocalZone); }
KDateTime::Spec KDateTime::Spec::OffsetFromUTC(int utcOffset) {
return Spec(KDateTime::OffsetFromUTC, utcOffset); }
are out of the API style guidelines because they begin with a capital
letter.
--
Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
PGP/GPG: 0x6EF45358; fingerprint:
E067 918B B660 DBD1 105C 966C 33F5 F005 6EF4 5358
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20070609/dc8d1925/attachment.sig>
More information about the kde-core-devel
mailing list