[Kde-pim] Fwd: deprecated calls in kdepimlibs

didier chagniot chagniot at web.de
Fri Jan 12 18:57:15 GMT 2007


Hi David,

I've totaly missed the two points you've mentionned !

* the first point seems easy to solve: use of KDateTime::fromString(string, 
Format=QDateTime).

* For the second point I've read the deprecated code :
setDtEnd( QDateTime::fromString( s ) ).
The time zone is local (UTC) or dtStart().timeSpec() is used (if valid).

in formatter.cpp, two lines above setDtEnd( QDateTime::fromString( s ) ), 
setDtStart is set:
event->setDtStart( QDateTime::fromString( s ) ); // ## Format??

Should I put :
------------------------------------------------------
setFromStringDefault(event->dtStart().timeSpec());
event->setDtEnd( KDateTime::fromString(s, Format=QDateTime));
------------------------------------------------------
instead of :
event->setDtEnd( QDateTime::fromString( s ) );


best regards,

didier Chagniot

> On Thursday 28 December 2006 18:30, didier chagniot wrote:
> > Hi,
> >
> > please find enclosed a diff file regarding two small
> > fixes for deprecated API uses in kdepimlibs.
> >
> > branch: kde4 devel (trunk/kde/kdepimlibs)
> > based on revision: 616250
>
> I don't think that the change to ktnef/formatter.cpp is likely to work
> correctly. I haven't actually checked the code properly, but
> KDateTime::fromString() assumes a different default date/time string format
> from that assumed by QDateTime::fromString() as its default. Apart from
> that, have you verified that the time zone returned as default by
> KDateTime::fromString() is the appropriate one? (Again, I'm not saying that
> it's necessarily wrong - I just make the comment to ensure that you have
> thought about it properly before the change is committed.)
_______________________________________________
kde-pim mailing list
kde-pim at kde.org
https://mail.kde.org/mailman/listinfo/kde-pim
kde-pim home page at http://pim.kde.org/



More information about the kde-pim mailing list