Commit 230b8f20 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Port all instance of KRandom

parent 5c10d5cf
Pipeline #25411 passed with stage
in 22 minutes and 55 seconds
...@@ -29,7 +29,6 @@ ...@@ -29,7 +29,6 @@
#include <KLocalizedString> #include <KLocalizedString>
#include <KMessageBox> #include <KMessageBox>
#include <KRandom>
#include <QDateTime> #include <QDateTime>
#include <QDomDocument> #include <QDomDocument>
...@@ -38,6 +37,7 @@ ...@@ -38,6 +37,7 @@
#include <QString> #include <QString>
#include <QTimer> #include <QTimer>
#include <QFileInfo> #include <QFileInfo>
#include <QRandomGenerator>
#include <cassert> #include <cassert>
...@@ -131,7 +131,7 @@ void LoadFeedListCommand::setStorage(Backend::Storage *s) ...@@ -131,7 +131,7 @@ void LoadFeedListCommand::setStorage(Backend::Storage *s)
void LoadFeedListCommand::doStart() void LoadFeedListCommand::doStart()
{ {
QTimer::singleShot(KRandom::random() % 400, this, [this]() { QTimer::singleShot(QRandomGenerator::global()->bounded(400), this, [this]() {
d->doLoad(); d->doLoad();
}); });
} }
......
...@@ -35,12 +35,12 @@ ...@@ -35,12 +35,12 @@
#include <memory> #include <memory>
#include "akregator_debug.h" #include "akregator_debug.h"
#include <KLocalizedString> #include <KLocalizedString>
#include <KRandom>
#include <qdom.h> #include <qdom.h>
#include <QHash> #include <QHash>
#include <QSet> #include <QSet>
#include <QElapsedTimer> #include <QElapsedTimer>
#include <QRandomGenerator>
using namespace Akregator; using namespace Akregator;
class Q_DECL_HIDDEN FeedList::Private class Q_DECL_HIDDEN FeedList::Private
...@@ -455,7 +455,7 @@ void FeedList::setRootNode(Folder *folder) ...@@ -455,7 +455,7 @@ void FeedList::setRootNode(Folder *folder)
int FeedList::generateID() const int FeedList::generateID() const
{ {
return KRandom::random(); return QRandomGenerator::global()->generate();
} }
void FeedList::slotNodeAdded(TreeNode *node) void FeedList::slotNodeAdded(TreeNode *node)
......
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