summaryrefslogtreecommitdiffstats
path: root/src/corelib/plugin/quuid.cpp
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@intel.com>2016-06-21 14:08:22 -0700
committerThiago Macieira <thiago.macieira@intel.com>2016-06-22 18:34:27 +0000
commitbff15c547e71e79738dfc9de89c4ef05947c0953 (patch)
tree69e263b6bc4ce2fe42a937d88ec65379d8ebcc8f /src/corelib/plugin/quuid.cpp
parent90eee08b3e672573e3ad93470d844e1d498651dd (diff)
QDateTime: introduce {to,from,set,current}SecsSinceEpoch
These new functions use a 64-bit integer in the API, instead of the broken 32-bit unsigned integer that the previous xxxTime_t functions used. That was a design flaw when the API was introduced back in Qt 4.2, so I'm deprecating the API and slating it for removal in 6.0. The changes to qfilesystemmetadata_p.h and quuid.cpp are necessary to build the bootstrap library. The rest of the adaptation to the new API will come in the next commit. [ChangeLog][QtCore][QDateTime] Introduced toSecsSinceEpoch, fromSecsSinceEpoch and setSecsSinceEpoch functions, which use 64-bit integers to represent the number of seconds. [ChangeLog][QtCore][QDateTime] The toTime_t, fromTime_t and setTime_t functions are deprecated and will be removed in Qt 6.0. For new code, use the equivalent functions with "SecsSinceEpoch" in the name, or the equivalent ones with millisecond accurancy that have existed since Qt 4.7. Change-Id: Ib57b52598e2f452985e9fffd145a355d0e7ff48d Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Diffstat (limited to 'src/corelib/plugin/quuid.cpp')
-rw-r--r--src/corelib/plugin/quuid.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/corelib/plugin/quuid.cpp b/src/corelib/plugin/quuid.cpp
index 1780039928..875e8b8368 100644
--- a/src/corelib/plugin/quuid.cpp
+++ b/src/corelib/plugin/quuid.cpp
@@ -977,7 +977,7 @@ QUuid QUuid::createUuid()
#else
static bool seeded = false;
if (!seeded)
- qsrand(QDateTime::currentDateTimeUtc().toTime_t()
+ qsrand(QDateTime::currentDateTimeUtc().toSecsSinceEpoch()
+ quintptr(&seeded));
#endif