Bump required Qt version to 5.12

This commit is contained in:
Jonas Kvinge
2022-01-29 01:33:40 +01:00
parent e511b2faf9
commit f8d2c7eba3
31 changed files with 24 additions and 165 deletions

View File

@@ -46,9 +46,7 @@
#include <QTcpSocket>
#include <QSslSocket>
#include <QDateTime>
#if QT_VERSION >= QT_VERSION_CHECK(5, 10, 0)
# include <QRandomGenerator>
#endif
#include <QRandomGenerator>
LocalRedirectServer::LocalRedirectServer(QObject *parent)
: QTcpServer(parent),
@@ -152,11 +150,7 @@ bool LocalRedirectServer::GenerateCertificate() {
return false;
}
#if QT_VERSION >= QT_VERSION_CHECK(5, 10, 0)
quint64 serial = 9999999 + QRandomGenerator::global()->bounded(1000000);
#else
quint64 serial = (9999999 + qrand() % 1000000);
#endif
const quint64 serial = 9999999 + QRandomGenerator::global()->bounded(1000000);
QByteArray q_serial;
q_serial.setNum(serial);