Unverified Commit b5572156 authored by Luca Beltrame's avatar Luca Beltrame
Browse files

Port to QRandomGenerator from KRandom::random

KRandom::random() has been deprecated and AFAICS, the PIM CMake settings
disable deprecated API. This causes build failures.
parent 7d33df57
Pipeline #25405 passed with stage
in 18 minutes and 13 seconds
......@@ -34,6 +34,7 @@
#include <QDBusConnectionInterface>
#include <QDBusServiceWatcher>
#include <QPointer>
#include <QRandomGenerator>
#include <QRegularExpression>
#include <QStringList>
......@@ -43,7 +44,6 @@
#include <KEMailSettings>
#include <KLocalizedString>
#include <KMessageBox>
#include <KRandom>
#include <Kdelibs4ConfigMigrator>
#include <KWallet>
......@@ -547,7 +547,7 @@ int TransportManagerPrivate::createId() const
usedIds << 0; // 0 is default for unknown
int newId;
do {
newId = KRandom::random();
newId = QRandomGenerator::global()->generate();
} while (usedIds.contains(newId));
return newId;
}
......
Markdown is supported
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