summaryrefslogtreecommitdiff
path: root/Network/psk_reporter.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Network/psk_reporter.cpp')
-rw-r--r--Network/psk_reporter.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/Network/psk_reporter.cpp b/Network/psk_reporter.cpp
index e84b5a92..f84da5ec 100644
--- a/Network/psk_reporter.cpp
+++ b/Network/psk_reporter.cpp
@@ -7,6 +7,9 @@
#include <QHostInfo>
#include <QTimer>
+#if QT_VERSION >= QT_VERSION_CHECK(5, 15, 0)
+#include <QRandomGenerator>
+#endif
#include "Network/MessageClient.hpp"
@@ -43,7 +46,11 @@ PSK_Reporter::PSK_Reporter(MessageClient * message_client, QObject *parent) :
"00960004"; // Report time
+#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0)
m_randomId_h = QString("%1").arg(qrand(),8,16,QChar('0'));
+#else
+ m_randomId_h = QString("%1").arg(QRandomGenerator::global ()->generate (), 8, 16, QChar('0'));
+#endif
QHostInfo::lookupHost("report.pskreporter.info", this, SLOT(dnsLookupResult(QHostInfo)));