summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/corelib/plugin/quuid.cpp4
-rw-r--r--src/gui/painting/qpdf.cpp2
-rw-r--r--src/network/access/qnetworkcookie.cpp2
-rw-r--r--src/plugins/bearer/qnetworksession_impl.cpp2
4 files changed, 5 insertions, 5 deletions
diff --git a/src/corelib/plugin/quuid.cpp b/src/corelib/plugin/quuid.cpp
index 6698b140af..0e1557941d 100644
--- a/src/corelib/plugin/quuid.cpp
+++ b/src/corelib/plugin/quuid.cpp
@@ -963,7 +963,7 @@ QUuid QUuid::createUuid()
{
int *pseed = new int;
static QBasicAtomicInt serial = Q_BASIC_ATOMIC_INITIALIZER(2);
- qsrand(*pseed = QDateTime::currentDateTime().toTime_t()
+ qsrand(*pseed = QDateTime::currentDateTimeUtc().toTime_t()
+ quintptr(&pseed)
+ serial.fetchAndAddRelaxed(1));
uuidseed.setLocalData(pseed);
@@ -971,7 +971,7 @@ QUuid QUuid::createUuid()
#else
static bool seeded = false;
if (!seeded)
- qsrand(QDateTime::currentDateTime().toTime_t()
+ qsrand(QDateTime::currentDateTimeUtc().toTime_t()
+ quintptr(&seeded));
#endif
diff --git a/src/gui/painting/qpdf.cpp b/src/gui/painting/qpdf.cpp
index 47483b2869..d746ab9379 100644
--- a/src/gui/painting/qpdf.cpp
+++ b/src/gui/painting/qpdf.cpp
@@ -1498,7 +1498,7 @@ void QPdfEnginePrivate::writeInfo()
printString(creator);
xprintf("\n/Producer ");
printString(QString::fromLatin1("Qt " QT_VERSION_STR));
- QDateTime now = QDateTime::currentDateTime().toUTC();
+ QDateTime now = QDateTime::currentDateTimeUtc();
QTime t = now.time();
QDate d = now.date();
xprintf("\n/CreationDate (D:%d%02d%02d%02d%02d%02d)\n",
diff --git a/src/network/access/qnetworkcookie.cpp b/src/network/access/qnetworkcookie.cpp
index 8a24fc55fd..2d8f192d03 100644
--- a/src/network/access/qnetworkcookie.cpp
+++ b/src/network/access/qnetworkcookie.cpp
@@ -901,7 +901,7 @@ QList<QNetworkCookie> QNetworkCookiePrivate::parseSetCookieHeaderLine(const QByt
// We do not support RFC 2965 Set-Cookie2-style cookies
QList<QNetworkCookie> result;
- QDateTime now = QDateTime::currentDateTime().toUTC();
+ const QDateTime now = QDateTime::currentDateTimeUtc();
int position = 0;
const int length = cookieString.length();
diff --git a/src/plugins/bearer/qnetworksession_impl.cpp b/src/plugins/bearer/qnetworksession_impl.cpp
index 5e9e5e7015..8139040f84 100644
--- a/src/plugins/bearer/qnetworksession_impl.cpp
+++ b/src/plugins/bearer/qnetworksession_impl.cpp
@@ -279,7 +279,7 @@ quint64 QNetworkSessionPrivateImpl::bytesReceived() const
quint64 QNetworkSessionPrivateImpl::activeTime() const
{
if (state == QNetworkSession::Connected && startTime != Q_UINT64_C(0))
- return QDateTime::currentDateTime().toTime_t() - startTime;
+ return QDateTime::currentDateTimeUtc().toTime_t() - startTime;
return Q_UINT64_C(0);
}