Commit 6e3071bc authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Port qrand

parent eae60c6b
Pipeline #80023 canceled with stage
......@@ -8,8 +8,8 @@
#include "job.h"
#include "private/protocol_p.h"
#include "session_p.h"
#include <QCoreApplication>
#include <QRandomGenerator>
#include <QTimer>
using namespace std::chrono_literals;
class FakeSessionPrivate : public SessionPrivate
......@@ -30,7 +30,7 @@ public:
if (!id.isEmpty()) {
sessionId = id;
} else {
sessionId = QCoreApplication::instance()->applicationName().toUtf8() + '-' + QByteArray::number(qrand());
sessionId = QCoreApplication::instance()->applicationName().toUtf8() + '-' + QByteArray::number(QRandomGenerator::global()->bounded(1, RAND_MAX));
}
connected = false;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment