Commit 30588b37 authored by Albert Astals Cid's avatar Albert Astals Cid

Port away from KRandom

parent 1382a024
......@@ -9,8 +9,8 @@ set(RELEASE_SERVICE_VERSION "${RELEASE_SERVICE_VERSION_MAJOR}.${RELEASE_SERVICE_
project(blinken VERSION ${RELEASE_SERVICE_VERSION})
# minimal Qt requirement
set(QT_MIN_VERSION "5.9.0")
set(KF5_MIN_VERSION "5.46.0")
set(QT_MIN_VERSION "5.10.0")
set(KF5_MIN_VERSION "5.55.0")
# ECM
find_package (ECM ${KF5_MIN_VERSION} REQUIRED NO_MODULE)
......
......@@ -9,11 +9,9 @@
#include "blinkengame.h"
#include <stdlib.h> // for RAND_MAX
#include <QRandomGenerator>
#include <QTimer>
#include <KRandom>
#include "soundsplayer.h"
blinkenGame::blinkenGame() : m_phase(starting)
......@@ -152,11 +150,10 @@ void blinkenGame::nextRound()
blinkenGame::color blinkenGame::generateColor()
{
int r;
// make the compiler happy :-D
color c = none;
r = 1 + (int)(4.0 * KRandom::random() / (RAND_MAX + 1.0));
const int r = QRandomGenerator::global()->bounded(1, 5); // rand [1, 5)
switch(r)
{
case 1:
......
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