Members of the KDE Community are recommended to subscribe to the kde-community mailing list at https://mail.kde.org/mailman/listinfo/kde-community to allow them to participate in important discussions and receive other important announcements

Commit 7d8793d6 authored by Nikita Sirgienko's avatar Nikita Sirgienko

[Scilab] Fix startup and some problems with segfault

parent 98f43720
......@@ -86,7 +86,8 @@ void ScilabExpression::parseOutput(QString output)
qDebug() << "output: " << output;
m_output = output;
setResult(new Cantor::TextResult(output));
if (!output.simplified().isEmpty())
setResult(new Cantor::TextResult(output));
evalFinished();
setStatus(Cantor::Expression::Done);
......
......@@ -69,7 +69,6 @@ void ScilabSession::login()
m_process->setProcessChannelMode(QProcess::SeparateChannels);
m_process->start();
m_process->waitForStarted();
m_process->waitForReadyRead();
if(ScilabSettings::integratePlots()){
......@@ -188,7 +187,8 @@ void ScilabSession::readError()
QString error = QLatin1String(m_process->readAllStandardError());
qDebug() << "error: " << error;
static_cast<ScilabExpression*>(expressionQueue().first())->parseError(error);
if (!expressionQueue().isEmpty())
static_cast<ScilabExpression*>(expressionQueue().first())->parseError(error);
}
void ScilabSession::readOutput()
......@@ -222,7 +222,7 @@ void ScilabSession::plotFileChanged(const QString& filename)
{
qDebug() << "plotFileChanged filename:" << filename;
if (expressionQueue().first() && (filename.contains(QLatin1String("cantor-export-scilab-figure")))){
if (!expressionQueue().isEmpty() && (filename.contains(QLatin1String("cantor-export-scilab-figure")))){
qDebug() << "Calling parsePlotFile";
static_cast<ScilabExpression*>(expressionQueue().first())->parsePlotFile(filename);
......
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