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 d208a000 authored by Alexander Semke's avatar Alexander Semke

Remove some redundant and noisy debug output and some other minor cleanup changes.

parent 503b879a
......@@ -37,7 +37,6 @@
RExpression::RExpression( Cantor::Session* session ) : Cantor::Expression(session)
{
qDebug();
}
......@@ -46,10 +45,8 @@ RExpression::~RExpression()
}
void RExpression::evaluate()
{
qDebug()<<"evaluating "<<command();
setStatus(Cantor::Expression::Computing);
if(command().startsWith(QLatin1Char('?')))
m_isHelpRequest=true;
......
......@@ -54,7 +54,6 @@ MaximaExpression::~MaximaExpression()
void MaximaExpression::evaluate()
{
qDebug()<<"evaluating "<<command();
setStatus(Cantor::Expression::Computing);
//until we get the real output Id from maxima, set it to invalid
......@@ -328,9 +327,6 @@ bool MaximaExpression::parseOutput(QString& out)
{
enum ParserStatus{ReadingOpeningTag, ReadingClosingTag, ReadingText};
int idx=0;
qDebug()<<"attempting to parse "<<out;
int numResults=0;
QString textBuffer;
QString latexBuffer;
......
......@@ -49,10 +49,10 @@ const QRegExp MaximaSession::MaximaOutputPrompt=QRegExp(QLatin1String("(\\(\\s*%
static QString initCmd=QLatin1String(":lisp($load \"%1\")");
MaximaSession::MaximaSession( Cantor::Backend* backend ) : Session(backend),
m_initState(MaximaSession::NotInitialized),
m_process(nullptr),
m_justRestarted(false),
m_variableModel(new MaximaVariableModel(this))
m_variableModel(new MaximaVariableModel(this)),
m_initState(MaximaSession::NotInitialized),
m_justRestarted(false)
{
}
......@@ -160,6 +160,7 @@ void MaximaSession::logout()
Cantor::Expression* MaximaSession::evaluateExpression(const QString& cmd, Cantor::Expression::FinishingBehavior behave)
{
qDebug() << "evaluating: " << cmd;
MaximaExpression* expr = new MaximaExpression(this);
expr->setFinishingBehavior(behave);
expr->setCommand(cmd);
......@@ -196,7 +197,6 @@ void MaximaSession::readStdErr()
void MaximaSession::readStdOut()
{
qDebug()<<"reading stdOut";
if (!m_process)
return;
#ifndef Q_OS_WIN
......@@ -207,7 +207,7 @@ void MaximaSession::readStdOut()
out.remove(QLatin1Char('\r'));
qDebug()<<"out: "<<out;
qDebug() << "std out: " << out;
m_cache+=out;
......
......@@ -142,7 +142,7 @@ void OctaveSession::processError()
Cantor::Expression* OctaveSession::evaluateExpression ( const QString& command, Cantor::Expression::FinishingBehavior finishingBehavior )
{
qDebug() << "evaluateExpression: " << command;
qDebug() << "evaluating: " << command;
OctaveExpression* expression = new OctaveExpression ( this );
expression->setCommand ( command );
expression->setFinishingBehavior ( finishingBehavior );
......
......@@ -46,7 +46,6 @@ PythonExpression::~PythonExpression()
void PythonExpression::evaluate()
{
qDebug() << "evaluating " << command();
setStatus(Cantor::Expression::Computing);
PythonSession* pythonSession = dynamic_cast<PythonSession*>(session());
......
......@@ -43,7 +43,6 @@ SageExpression::~SageExpression()
void SageExpression::evaluate()
{
qDebug()<<"evaluating "<<command();
setStatus(Cantor::Expression::Computing);
m_imagePath.clear();
......
......@@ -51,7 +51,6 @@ ScilabExpression::~ScilabExpression()
void ScilabExpression::evaluate()
{
qDebug() << "evaluating " << command();
setStatus(Cantor::Expression::Computing);
ScilabSession* scilabSession = dynamic_cast<ScilabSession*>(session());
......
......@@ -499,8 +499,6 @@ KParts::ReadWritePart* CantorShell::findPart(QWidget* widget)
void CantorShell::updatePanel()
{
qDebug()<<"updating panels";
unplugActionList(QLatin1String("view_show_panel_list"));
//remove all of the previous panels (but do not delete the widgets)
......
......@@ -22,8 +22,6 @@
using namespace Cantor;
#include <KPluginMetaData>
#include <QDebug>
class Cantor::PanelPluginPrivate
{
public:
......@@ -61,7 +59,6 @@ void PanelPlugin::setPluginInfo(KPluginMetaData info)
d->requiredExtensions=info.value(QLatin1String("RequiredExtensions")).split(QLatin1Char(','));
}
QStringList PanelPlugin::requiredExtensions()
{
return d->requiredExtensions;
......@@ -84,7 +81,6 @@ Session* PanelPlugin::session()
void PanelPlugin::setSession(Session* session)
{
qDebug()<<"setting session to "<<session;
d->session=session;
onSessionChanged();
}
......@@ -93,5 +89,3 @@ void PanelPlugin::onSessionChanged()
{
}
......@@ -20,17 +20,12 @@
#include "variablemanagerplugin.h"
#include <QDebug>
#include "cantor_macros.h"
#include "session.h"
#include "variablemanagerwidget.h"
VariableManagerPlugin::VariableManagerPlugin(QObject* parent, QList<QVariant> args) : Cantor::PanelPlugin(parent)
VariableManagerPlugin::VariableManagerPlugin(QObject* parent, QList<QVariant> args) : Cantor::PanelPlugin(parent), m_widget(nullptr)
{
Q_UNUSED(args);
m_widget=nullptr;
}
VariableManagerPlugin::~VariableManagerPlugin()
......@@ -48,7 +43,6 @@ QWidget* VariableManagerPlugin::widget()
{
if(m_widget==nullptr)
{
qDebug()<<"creating new widget";
m_widget=new VariableManagerWidget(session(), parentWidget());
connect(m_widget.data(), &VariableManagerWidget::runCommand, this, &VariableManagerPlugin::requestRunCommand);
}
......
......@@ -20,14 +20,13 @@
#include "variablemanagerwidget.h"
#include <QTreeView>
#include <QToolButton>
#include <QDialog>
#include <QFileDialog>
#include <QPushButton>
#include <QDebug>
#include <QToolButton>
#include <QTreeView>
#include <KIconLoader>
#include <QFileDialog>
#include <KMessageBox>
#include "session.h"
......@@ -100,12 +99,10 @@ VariableManagerWidget::~VariableManagerWidget()
void VariableManagerWidget::setSession(Cantor::Session* session)
{
qDebug()<<"setting session to "<<session;
m_session=session;
if(session)
{
m_model=session->variableModel();
qDebug()<<"model: "<<m_model;
if(m_table)
m_table->setModel(m_model);
}
......@@ -116,7 +113,6 @@ void VariableManagerWidget::clearVariables()
int btn=KMessageBox::questionYesNo(this, i18n("Are you sure you want to remove all variables?"), i18n("Confirmation - Cantor"));
if(btn==KMessageBox::Yes)
{
qDebug()<<"removing it all";
m_model->removeRows(0, m_model->rowCount());
//evaluate the "clear" command
......
......@@ -24,16 +24,14 @@
#include <QParallelAnimationGroup>
#include <QPropertyAnimation>
#include <QScrollBar>
#include <QDebug>
WorksheetView::WorksheetView(Worksheet* scene, QWidget* parent)
: QGraphicsView(scene, parent)
WorksheetView::WorksheetView(Worksheet* scene, QWidget* parent) : QGraphicsView(scene, parent),
m_scale(1),
m_animation(nullptr),
m_hAnimation(nullptr),
m_vAnimation(nullptr),
m_worksheet(scene)
{
m_scale = 1;
m_animation = nullptr;
m_hAnimation = nullptr;
m_vAnimation = nullptr;
m_worksheet = scene;
connect(scene, SIGNAL(sceneRectChanged(const QRectF&)),
this, SLOT(sceneRectChanged(const QRectF&)));
setAlignment(Qt::AlignLeft | Qt::AlignTop);
......@@ -70,8 +68,6 @@ void WorksheetView::makeVisible(const QRectF& sceneRect)
else
y = 0;
qDebug() << rect << QRectF(x,y,w,h);
if (!m_animation && QRectF(x,y,w,h).contains(rect))
return;
......@@ -85,8 +81,6 @@ void WorksheetView::makeVisible(const QRectF& sceneRect)
else
nx = rect.x() + rect.width() - w;
qDebug() << nx << ny;
if (!m_worksheet->animationsEnabled()) {
if (horizontalScrollBar())
horizontalScrollBar()->setValue(nx);
......@@ -139,7 +133,6 @@ void WorksheetView::makeVisible(const QRectF& sceneRect)
value * ny);
m_vAnimation->setStartValue(sy);
m_vAnimation->setEndValue(ny);
//qDebug() << sy << value << ny;
}
} else {
m_vAnimation = nullptr;
......@@ -287,5 +280,3 @@ void WorksheetView::zoomOut()
scale(1/1.1, 1/1.1);
updateSceneSize();
}
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