diff --git a/src/backends/R/rexpression.cpp b/src/backends/R/rexpression.cpp index 5dc1768f..feaf1277 100644 --- a/src/backends/R/rexpression.cpp +++ b/src/backends/R/rexpression.cpp @@ -1,152 +1,156 @@ /* This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. --- Copyright (C) 2009 Alexander Rieder */ #include "rexpression.h" #include "textresult.h" #include "imageresult.h" #include "helpresult.h" #include "epsresult.h" #include "rsession.h" #include #include #include #include #include #include #include RExpression::RExpression( Cantor::Session* session ) : Cantor::Expression(session) { } RExpression::~RExpression() { } void RExpression::evaluate() { setStatus(Cantor::Expression::Computing); if(command().startsWith(QLatin1Char('?'))) m_isHelpRequest=true; else m_isHelpRequest=false; static_cast(session())->queueExpression(this); } void RExpression::interrupt() { qDebug()<<"interrupting command"; if(status()==Cantor::Expression::Computing) session()->interrupt(); setStatus(Cantor::Expression::Interrupted); } void RExpression::finished(int returnCode, const QString& text) { if(returnCode==RExpression::SuccessCode) { setResult(new Cantor::TextResult(Qt::convertFromPlainText(text))); setStatus(Cantor::Expression::Done); }else if (returnCode==RExpression::ErrorCode) { setResult(new Cantor::TextResult(Qt::convertFromPlainText(text))); setStatus(Cantor::Expression::Error); setErrorMessage(Qt::convertFromPlainText(text)); } } void RExpression::evaluationStarted() { setStatus(Cantor::Expression::Computing); } void RExpression::addInformation(const QString& information) { static_cast(session())->sendInputToServer(information); } void RExpression::showFilesAsResult(const QStringList& files) { qDebug()<<"showing files: "< and & with their html code, so they won't be confused as html tags content.replace( QLatin1Char('<') , QLatin1String("<")); content.replace( QLatin1Char('>') , QLatin1String(">")); content.replace( QLatin1Char('&') , QLatin1String("&")); } qDebug()<<"content: "<