Commit fdbb83f9 authored by Andreas Cord-Landwehr's avatar Andreas Cord-Landwehr
Browse files

Port away from KRandomSequence

parent bcd95caf
......@@ -8,10 +8,10 @@
#include <QFontMetrics>
#include <QPainter>
#include <QRandomGenerator>
#include <KRandom>
#include <KColorScheme>
using namespace Practice;
MixedLettersModeWidget::MixedLettersModeWidget(GuiFrontend *frontend, QWidget *parent)
......@@ -77,11 +77,11 @@ void MixedLettersModeWidget::setSolution(const QVariant& solution)
Q_FOREACH(QChar ch, solution.toString()) {
chars.append(ch);
}
m_randomSequence.randomize(chars);
KRandom::shuffle(chars);
m_mixedSolution.clear();
m_positions.clear();
Q_FOREACH(QChar ch, chars) {
m_mixedSolution.append(ch);
m_positions.append(m_randomSequence.getInt(8));
m_positions.append(QRandomGenerator::global()->bounded(8));
}
}
......@@ -8,8 +8,6 @@
#include "writtenpracticewidget.h"
#include <KRandomSequence>
namespace Ui
{
class WrittenPracticeWidget;
......@@ -41,7 +39,6 @@ private:
QString m_question;
QList<int> m_positions;
QPixmap m_pixmap;
KRandomSequence m_randomSequence;
QFont m_solutionFont;
};
......
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