Review Request 110876: Port time_t to QDateTime in Loader, KHTMLPart and DocumentImpl (KHTML)

David Faure faure at kde.org
Tue Jun 11 08:56:33 UTC 2013



> On June 10, 2013, 8:30 a.m., David Faure wrote:
> > khtml/xml/dom_docimpl.cpp, line 2007
> > <http://git.reviewboard.kde.org/r/110876/diff/1/?file=149046#file149046line2007>
> >
> >     This isn't about two QDateTimes.
> >     
> >     It's about one QDateTime (m_creationDate) and one number of seconds, str.toULong(), relative to that creation date.
> >     
> >     If you don't call fromTime_t(str.toULong) but rather, like the old code, interpret that as a number of seconds relative to the creation date, you won't have the issue of two qdatetimes.
> >     
> >     In other words, this line should be
> >       expire_date = m_creationDate.addSecs(str.toULong());
> >     
> >     That's what the old code was doing (via relative=true).
> >     
> >     No need to change the DocLoader methods further, AFAICS.
> 
> David Gil Oliva wrote:
>     AFAICS, your line can't work because m_creationDate is not a member of DocumentImpl, but a member of DocLoader. That's why I suggested overloading void DocLoader::setExpireDate(int seconds) or writing another method, for example, void DocLoader::setRelativeExpireDate(const int seconds).
>     
>     Thank you for your time (and your patience) :-)

Ah, I see. Yes, ok for setRelativeExpireDate(int seconds)   (not "const int", it serves no purpose in the .h)

[The alternative would be an accessor for m_creationDate, but I prefer your solution, it's more encapsulated.]


- David


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/110876/#review34019
-----------------------------------------------------------


On June 7, 2013, 10:35 p.m., David Gil Oliva wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/110876/
> -----------------------------------------------------------
> 
> (Updated June 7, 2013, 10:35 p.m.)
> 
> 
> Review request for KDE Frameworks.
> 
> 
> Description
> -------
> 
> Port time_t to QDateTime in Loader, KHTMLPart and DocumentImpl (KHTML)
> 
> 
> Diffs
> -----
> 
>   khtml/khtml_part.cpp a97ca0d8179a438a0ceb713100b5c335995ae9f4 
>   khtml/misc/loader.h 5e9db0f8baef69c7bb146e4bd6c8cefcdbfe09c2 
>   khtml/misc/loader.cpp c8812755b99f841f6e7b90da8e154810c1f7c23f 
>   khtml/xml/dom_docimpl.cpp 15f491857ebd17ef21a6df8e187ed16052974cca 
> 
> Diff: http://git.reviewboard.kde.org/r/110876/diff/
> 
> 
> Testing
> -------
> 
> It builds.
> 
> 
> Thanks,
> 
> David Gil Oliva
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20130611/3dc1c6b6/attachment-0001.html>


More information about the Kde-frameworks-devel mailing list