diff options
author | Marc Mutz <marc.mutz@kdab.com> | 2015-10-23 16:32:59 +0200 |
---|---|---|
committer | Marc Mutz <marc.mutz@kdab.com> | 2015-10-27 11:10:01 +0000 |
commit | f8eeabcf5ca4615fcb3ed783dbd321f4998a7651 (patch) | |
tree | c641a8f918eac90ac581f83bc51392847a0bd135 /src/widgets/graphicsview/qgraphicswidget.cpp | |
parent | 39e023b805cf2be207ef7086f6951e789e020bda (diff) |
QNetworkReplyHttpImpl: convert some QDateTime::currentDateTime() to currentDateTimeUtc()
The latter is much faster as it doesn't have to deal with
time zones.
This change is safe, because the QDateTime is only used to
compare against a copy of itself, adjusted by some seconds,
which doen't care which TZ the date-time is in, to get a
time_t, which is much faster done from a UTC time, and
to calculate the seconds to expirationTime, which, from a
quick glance around, seem to be mostly, if not exclusively,
in UTC. secsTo() works across time zones, but the comparison
between UTC date-times is fastest.
Credits to Milian Wolff, from whose QtWS15 talk this advice is
taken.
Change-Id: I22aa5350b29493f01fb503ef5ec68a964ca95cf3
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
Diffstat (limited to 'src/widgets/graphicsview/qgraphicswidget.cpp')
0 files changed, 0 insertions, 0 deletions