summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Semke <alexander.semke@web.de>2016-11-05 12:48:23 (GMT)
committerAlexander Semke <alexander.semke@web.de>2016-11-05 12:48:23 (GMT)
commit6ffe8bfed1601d3d9ca998907682a839a0566d4a (patch)
tree7ee9273f4af1271d7e1ca96b3052785d5bc5df60
parentf1a564b9a773889af501e68e1eabe1a89b3bc161 (diff)
Removed unused variables and includes in maximasession.
-rw-r--r--src/backends/maxima/maximasession.cpp11
-rw-r--r--src/backends/maxima/maximasession.h17
2 files changed, 7 insertions, 21 deletions
diff --git a/src/backends/maxima/maximasession.cpp b/src/backends/maxima/maximasession.cpp
index 8f12a14..1dec0fe 100644
--- a/src/backends/maxima/maximasession.cpp
+++ b/src/backends/maxima/maximasession.cpp
@@ -24,15 +24,14 @@
#include "maximasyntaxhelpobject.h"
#include "maximahighlighter.h"
#include "maximavariablemodel.h"
+#include "result.h"
+#include "settings.h"
#include <QDebug>
#include <QTimer>
-#include <QTcpSocket>
-#include <QTcpServer>
#include <KMessageBox>
#include <KLocalizedString>
#include <signal.h>
-#include "settings.h"
#ifdef Q_OS_WIN
#include <KProcess>
@@ -41,19 +40,16 @@
#include <KPtyDevice>
#endif
-#include "result.h"
//NOTE: the \\s in the expressions is needed, because Maxima seems to sometimes insert newlines/spaces between the letters
//maybe this is caused by some behaviour if the Prompt is split into multiple "readStdout" calls
//the Expressions are encapsulated in () to allow capturing for the text
const QRegExp MaximaSession::MaximaOutputPrompt=QRegExp(QLatin1String("(\\(\\s*%\\s*O\\s*[0-9\\s]*\\))")); //Text, maxima outputs, before any output
-
static QString initCmd=QLatin1String(":lisp($load \"%1\")\n");
MaximaSession::MaximaSession( Cantor::Backend* backend ) : Session(backend)
{
- qDebug();
m_initState=MaximaSession::NotInitialized;
//m_maxima=0;
m_process=0;
@@ -64,7 +60,6 @@ MaximaSession::MaximaSession( Cantor::Backend* backend ) : Session(backend)
MaximaSession::~MaximaSession()
{
- qDebug();
}
void MaximaSession::login()
@@ -190,7 +185,6 @@ Cantor::Expression* MaximaSession::evaluateExpression(const QString& cmd, Cantor
return expr;
}
-
void MaximaSession::appendExpressionToQueue(MaximaExpression* expr)
{
m_expressionQueue.append(expr);
@@ -439,7 +433,6 @@ void MaximaSession::restartsCooledDown()
m_justRestarted=false;
}
-
void MaximaSession::setTypesettingEnabled(bool enable)
{
//we use the lisp command to set the variable, as those commands
diff --git a/src/backends/maxima/maximasession.h b/src/backends/maxima/maximasession.h
index 6f29dd5..773d9b1 100644
--- a/src/backends/maxima/maximasession.h
+++ b/src/backends/maxima/maximasession.h
@@ -23,21 +23,16 @@
#include "session.h"
#include "expression.h"
-
-#include <KDirWatch>
-#include <QRegExp>
#include <QProcess>
-#include <QXmlStreamReader>
class MaximaExpression;
class MaximaVariableModel;
-#ifndef Q_OS_WIN
+
+#ifdef Q_OS_WIN
+ class KProcess;
+#else
class KPtyProcess;
#endif
-class KProcess;
-class QTcpServer;
-class QTimer;
-class QAbstractItemModel;
class MaximaSession : public Cantor::Session
{
@@ -79,6 +74,7 @@ class MaximaSession : public Cantor::Session
void killLabels();
void reportProcessError(QProcess::ProcessError error);
+
private:
//windows doesn't support Pty
#ifdef Q_OS_WIN
@@ -92,9 +88,6 @@ class MaximaSession : public Cantor::Session
enum InitState{NotInitialized, Initializing, Initialized};
InitState m_initState;
- QString m_tmpPath;
-
- QTimer* m_restartCooldown;
bool m_justRestarted;
};