Commit 10d2f869 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Port to QRandomGenerator

parent 232bbd42
......@@ -29,6 +29,7 @@
#include <QDebug>
#include <QDir>
#include <QFile>
#include <QRandomGenerator>
#include <KIconLoader>
......@@ -54,11 +55,12 @@ void ScilabExpression::evaluate()
QStringList commandList = command().split(QLatin1String("\n"));
auto *generator = QRandomGenerator::global();
for(int count = 0; count < commandList.size(); count++){
if(commandList.at(count).toLocal8Bit().contains("plot")){
exportCommand = QString::fromLatin1("\nxs2png(gcf(), 'cantor-export-scilab-figure-%1.png');\ndelete(gcf());").arg(qrand());
exportCommand = QString::fromLatin1("\nxs2png(gcf(), 'cantor-export-scilab-figure-%1.png');\ndelete(gcf());").arg(generator->generate());
commandList[count].append(exportCommand);
......
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