diff options
author | John Layt <jlayt@kde.org> | 2013-08-12 21:21:42 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-09-20 23:45:06 +0200 |
commit | 18322bfabc3c349040bb370167e2642dc734bd50 (patch) | |
tree | 8846f14fb26728b8e93849c96ba10d4d1602c980 /src/corelib/kernel/qeventloop.h | |
parent | 662f23ff5b418cd213a3f3328cf28b53b2617de5 (diff) |
QDateTime - Change date/time storage to msecs
Change from storing the date and time as QDate and QTime to a serialised
msecs format. This format is a direct translation of the QDate and
QTime values, it is not the actual msecs since the Unix epoch. This
msecs format ensures we are always able to recreate the original QDate
and QTime values, but should still simplify the code and improve
performance.
Because we no longer store the explicit date and time we need to store
their isNull()/isValid() status separately.
The changes in storage results in the same memory footprint as before.
Note that this change does not optimize the code nor set out to fix the
known bugs, it only seeks to maintain the current behavior, although
some bugs are fixed implicitly. More bug fixes and optimizations will
follow.
[ChangeLog][Important Behavior Changes] The supported date range in
QDateTime has been reduced to about +/- 292 million years, the range
supported by the number of msecs since the Unix epoch of 1 Jan 1970
as stored in a qint64, and as able to be used in the
setMSecsSinceEpoch() and toMSecsSinceEpoch() methods.
Change-Id: I98804d8781909555d3313a3a7080eb8e70cb46ad
Reviewed-by: Sérgio Martins <sergio.martins@kdab.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/corelib/kernel/qeventloop.h')
0 files changed, 0 insertions, 0 deletions