summaryrefslogtreecommitdiffstats
path: root/src/corelib/kernel/qfunctions_wince.h
diff options
context:
space:
mode:
authorJohn Layt <jlayt@kde.org>2013-08-12 21:21:42 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-09-20 23:45:06 +0200
commit18322bfabc3c349040bb370167e2642dc734bd50 (patch)
tree8846f14fb26728b8e93849c96ba10d4d1602c980 /src/corelib/kernel/qfunctions_wince.h
parent662f23ff5b418cd213a3f3328cf28b53b2617de5 (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/qfunctions_wince.h')
-rw-r--r--src/corelib/kernel/qfunctions_wince.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/corelib/kernel/qfunctions_wince.h b/src/corelib/kernel/qfunctions_wince.h
index ab7bbe3f99..c71bd6a142 100644
--- a/src/corelib/kernel/qfunctions_wince.h
+++ b/src/corelib/kernel/qfunctions_wince.h
@@ -108,6 +108,7 @@ struct tm {
#endif // _TM_DEFINED
FILETIME qt_wince_time_tToFt( time_t tt );
+time_t qt_wince_ftToTime_t( const FILETIME ft );
// File I/O ---------------------------------------------------------
#define _O_RDONLY 0x0001
@@ -433,6 +434,7 @@ generate_inline_return_func4(getenv_s, errno_t, size_t *, char *, size_t, const
generate_inline_return_func2(_putenv_s, errno_t, const char *, const char *)
generate_inline_return_func0(_getpid, int)
generate_inline_return_func1(time_tToFt, FILETIME, time_t)
+generate_inline_return_func1(ftToTime_t, time_t, FILETIME)
generate_inline_return_func0(_getdrive, int)
generate_inline_return_func2(_waccess, int, const wchar_t *, int)
generate_inline_return_func3(_wopen, int, const wchar_t *, int, int)