Commit 4668c26a authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Port to QRandomGenerator

parent 6d1fed56
......@@ -32,7 +32,7 @@
#include <AkonadiCore/CollectionColorAttribute>
#include <QFontDatabase>
#include <QRandomGenerator>
using namespace EventViews;
QSet<EventViews::EventView::ItemIcon> iconArrayToSet(const QByteArray &array)
......@@ -983,7 +983,7 @@ QColor Prefs::resourceColor(const QString &cal)
if (seed > 0 && seed - 1 < colors.size()) {
color.setNamedColor(colors[seed - 1]);
} else {
color.setRgb(qrand() % 256, qrand() % 256, qrand() % 256);
color.setRgb(QRandomGenerator::global()->bounded(256), QRandomGenerator::global()->bounded(256), QRandomGenerator::global()->bounded(256));
}
d->setInt(d->mBaseConfig.defaultResourceColorSeedItem(), (seed + 1));
d->mBaseConfig.setResourceColor(cal, color);
......
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