Commit 1eb215dc authored by Nikita Sirgienko's avatar Nikita Sirgienko
Browse files

Revert "Port to QRandomGenerator" because QRandomGenerator introduced only in...

Revert "Port to QRandomGenerator" because QRandomGenerator introduced only in Qt 5.10 (our minimal version is 5.6)

This reverts commit 10d2f869.
parent 10d2f869
......@@ -29,7 +29,6 @@
#include <QDebug>
#include <QDir>
#include <QFile>
#include <QRandomGenerator>
#include <KIconLoader>
......@@ -55,12 +54,11 @@ 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(generator->generate());
exportCommand = QString::fromLatin1("\nxs2png(gcf(), 'cantor-export-scilab-figure-%1.png');\ndelete(gcf());").arg(qrand());
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