KRandom -> QRandomGenerator

KRandom is now deprecated
This commit is contained in:
Albert Astals Cid
2020-07-04 12:19:27 +02:00
parent 49add727b0
commit 3cc2af7e18
2 changed files with 3 additions and 3 deletions

View File

@@ -8,7 +8,7 @@ set (RELEASE_SERVICE_VERSION "${RELEASE_SERVICE_VERSION_MAJOR}.${RELEASE_SERVICE
project(krfb VERSION ${RELEASE_SERVICE_VERSION})
set(QT_MIN_VERSION 5.6.0)
set(QT_MIN_VERSION 5.10.0)
set(KF5_MIN_VERSION 5.31.0)
find_package(ECM ${KF5_MIN_VERSION} NO_MODULE REQUIRED)

View File

@@ -26,10 +26,10 @@
#include <QApplication>
#include <QHostInfo>
#include <QDebug>
#include <QRandomGenerator>
#include <KLocalizedString>
#include <KUser>
#include <KRandom>
#include <KStringHandler>
#include <KWallet/KWallet>
@@ -213,7 +213,7 @@ QString InvitationsRfbServer::readableRandomString(int length)
{
QString str;
while (length) {
int r = KRandom::random() % 62;
int r = QRandomGenerator::global()->bounded(62);
r += 48;
if (r > 57) {
r += 7;