diff --git a/src/backends/R/rexpression.cpp b/src/backends/R/rexpression.cpp index e8e4e37f..373f8ded 100644 --- a/src/backends/R/rexpression.cpp +++ b/src/backends/R/rexpression.cpp @@ -1,151 +1,150 @@ /* 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, bool internal ) : Cantor::Expression(session, internal), m_isHelpRequest(false) { } void RExpression::evaluate() { if(command().startsWith(QLatin1Char('?'))) m_isHelpRequest=true; else m_isHelpRequest=false; session()->enqueueExpression(this); } void RExpression::interrupt() { qDebug()<<"interrupting command"; setStatus(Cantor::Expression::Interrupted); } void RExpression::finished(int returnCode, const QString& text) { if (status() == Expression::Interrupted) return; if(returnCode==RExpression::SuccessCode) { qDebug() << "text: " << text; setResult(new Cantor::TextResult(text)); setStatus(Cantor::Expression::Done); }else if (returnCode==RExpression::ErrorCode) { qDebug() << "text: " << text; //setResult(new Cantor::TextResult(text)); setErrorMessage(text); setStatus(Cantor::Expression::Error); } } void RExpression::addInformation(const QString& information) { static_cast(session())->sendInputToServer(information); } void RExpression::showFilesAsResult(const QStringList& files) { qDebug()<<"showing files: "<