On Sonntag, 13. September 2015 23:04:01 CEST, David Faure wrote:

It's really a problem that QDateTime isn't threadsafe, it's really unexpected for application programmers.

The particular conversion happens because /you/ followed Thiago's advise to use 
UTC, but QFileInfo does not - what causes three extra I/Os on every QFileInfo 
induced stat :-(

Since the timespec of QFileInfo isn't mentioned in the documentation, QDateTime handles 
deviating specs and given Thiago's (imo very valid) comment: would it be "ok" 
to simply use UTC in QFileInfo? (so the user code has to call toLocalTime instead of 
relying on some undocumented implementation detail)

If not, having QFileInfo::*Utc variants (and recommendation to use them) in 
QFileInfo seems to be a good idea regarding thread safety as well as 
performance.

Cheers,
Thomas

Reply via email to