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.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/corelib/plugin/quuid.cpp b/src/corelib/plugin/quuid.cpp
index 1a7073a0698..0afce7fcf0a 100644
--- a/src/corelib/plugin/quuid.cpp
+++ b/src/corelib/plugin/quuid.cpp
@@ -968,7 +968,7 @@ QUuid QUuid::createUuid()
if (!uuidseed.hasLocalData())
{
int *pseed = new int;
- static QBasicAtomicInt serial;
+ static QBasicAtomicInt serial = Q_BASIC_ATOMIC_INITIALIZER(0);
qsrand(*pseed = QDateTime::currentSecsSinceEpoch()
+ quintptr(&pseed)
+ 2 + serial.fetchAndAddRelaxed(1));