summaryrefslogtreecommitdiffstats
path: root/src/corelib/plugin/quuid.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/corelib/plugin/quuid.cpp')
-rw-r--r--src/corelib/plugin/quuid.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/corelib/plugin/quuid.cpp b/src/corelib/plugin/quuid.cpp
index 875e8b8368..f11ac6548b 100644
--- a/src/corelib/plugin/quuid.cpp
+++ b/src/corelib/plugin/quuid.cpp
@@ -969,7 +969,7 @@ QUuid QUuid::createUuid()
{
int *pseed = new int;
static QBasicAtomicInt serial = Q_BASIC_ATOMIC_INITIALIZER(2);
- qsrand(*pseed = QDateTime::currentDateTimeUtc().toTime_t()
+ qsrand(*pseed = QDateTime::currentSecsSinceEpoch()
+ quintptr(&pseed)
+ serial.fetchAndAddRelaxed(1));
uuidseed.setLocalData(pseed);
@@ -977,7 +977,7 @@ QUuid QUuid::createUuid()
#else
static bool seeded = false;
if (!seeded)
- qsrand(QDateTime::currentDateTimeUtc().toSecsSinceEpoch()
+ qsrand(QDateTime::currentSecsSinceEpoch()
+ quintptr(&seeded));
#endif