Verified Commit c0eb9678 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 6053954c
Pipeline #25402 passed with stage
in 10 minutes and 7 seconds
......@@ -44,13 +44,13 @@
#include <QIcon>
#include <QUrl>
#include <KRandom>
#include <QDateTime>
#include <QDomDocument>
#include <QDomElement>
#include <QHash>
#include <QList>
#include <QRandomGenerator>
#include <QTimer>
#include <memory>
......@@ -487,7 +487,7 @@ void Feed::setXmlUrl(const QString &s)
{
d->m_xmlUrl = s;
if (!Settings::fetchOnStartup()) {
QTimer::singleShot(KRandom::random() % 4000, this, &Feed::slotAddFeedIconListener); // TODO: let's give a gui some time to show up before starting the fetch when no fetch on startup is used. replace this with something proper later...
QTimer::singleShot(QRandomGenerator::global()->generate() % 4000, this, &Feed::slotAddFeedIconListener); // TODO: let's give a gui some time to show up before starting the fetch when no fetch on startup is used. replace this with something proper later...
}
}
......
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