Commit aa559457 authored by Alexander Semke's avatar Alexander Semke
Browse files

[coverity] fixed couple of uninitialized values, CIDs 323937, 323940, 323945,...

[coverity] fixed couple of uninitialized values, CIDs 323937, 323940, 323945, 323949, 323953, 323956, 323972, 323979, 323989, 323948, 323954, 323976, 323980, 323981, 323944.
parent 6ce8b4f5
......@@ -35,7 +35,8 @@
#include <QStringList>
#include <QTextDocument>
RExpression::RExpression( Cantor::Session* session, bool internal ) : Cantor::Expression(session, internal)
RExpression::RExpression( Cantor::Session* session, bool internal ) : Cantor::Expression(session, internal),
m_isHelpRequest(false)
{
}
......@@ -148,4 +149,3 @@ void RExpression::showFilesAsResult(const QStringList& files)
}
}
}
......@@ -31,8 +31,7 @@
QStringList JuliaServer::INTERNAL_VARIABLES =
QStringList() << QLatin1String("__originalSTDOUT__") << QLatin1String("__originalSTDERR__");
JuliaServer::JuliaServer(QObject *parent)
: QObject(parent)
JuliaServer::JuliaServer(QObject *parent) : QObject(parent), m_was_exception(false)
{
}
......
......@@ -28,8 +28,8 @@
#include <QProcess>
LuaSession::LuaSession( Cantor::Backend* backend) :
Session(backend),
LuaSession::LuaSession( Cantor::Backend* backend) : Session(backend),
m_L(nullptr),
m_process(nullptr),
m_currentExpression(nullptr)
{
......
......@@ -23,7 +23,8 @@
#include <QDebug>
OctaveSyntaxHelpObject::OctaveSyntaxHelpObject(const QString& command, Cantor::Session* session): SyntaxHelpObject(command, session)
OctaveSyntaxHelpObject::OctaveSyntaxHelpObject(const QString& command, Cantor::Session* session): SyntaxHelpObject(command, session),
m_expression(nullptr)
{
}
......
......@@ -22,8 +22,7 @@
#include <Python.h>
PythonServer::PythonServer(QObject* parent)
: QObject(parent)
PythonServer::PythonServer(QObject* parent) : QObject(parent), m_pModule(nullptr)
{
}
......
......@@ -44,6 +44,7 @@
PythonSession::PythonSession(Cantor::Backend* backend, int pythonVersion, const QString serverName, const QString DbusChannelName)
: Session(backend)
, m_variableModel(new Cantor::DefaultVariableModel(this))
, m_currentExpression(nullptr)
, m_pIface(nullptr)
, m_pProcess(nullptr)
, serverName(serverName)
......
......@@ -750,6 +750,7 @@ ParseOptions QalculateExpression::parseOptions()
}
po.base = QalculateSettings::base();
po.comma_as_separator = false;
return po;
}
......
......@@ -103,10 +103,12 @@ bool SageSession::VersionInfo::operator>=(SageSession::VersionInfo other) const
return !( *this < other);
}
SageSession::SageSession(Cantor::Backend* backend) : Session(backend)
SageSession::SageSession(Cantor::Backend* backend) : Session(backend),
m_process(nullptr),
m_isInitialized(false),
m_waitingForPrompt(false),
m_haveSentInitCmd(false)
{
m_isInitialized=false;
m_haveSentInitCmd=false;
connect( &m_dirWatch, SIGNAL(created(QString)), this, SLOT(fileCreated(QString)) );
}
......
......@@ -87,9 +87,9 @@ class SageSession : public Cantor::Session
void readStdErr();
private Q_SLOTS:
void currentExpressionChangedStatus(Cantor::Expression::Status status);
void processFinished(int exitCode, QProcess::ExitStatus exitStatus);
void reportProcessError(QProcess::ProcessError error);
void currentExpressionChangedStatus(Cantor::Expression::Status);
void processFinished(int exitCode, QProcess::ExitStatus);
void reportProcessError(QProcess::ProcessError);
void fileCreated(const QString& path);
private:
......@@ -97,7 +97,7 @@ class SageSession : public Cantor::Session
bool updateSageVersion();
private:
KPtyProcess* m_process;
int m_isInitialized;
bool m_isInitialized;
QString m_tmpPath;
KDirWatch m_dirWatch;
bool m_waitingForPrompt;
......
......@@ -37,7 +37,9 @@
using ScilabPlotResult = Cantor::ImageResult;
ScilabExpression::ScilabExpression( Cantor::Session* session, bool internal ) : Cantor::Expression(session, internal)
ScilabExpression::ScilabExpression( Cantor::Session* session, bool internal ) : Cantor::Expression(session, internal),
m_finished(false),
m_plotPending(false)
{
qDebug() << "ScilabExpression constructor";
}
......
......@@ -33,15 +33,13 @@ class ScilabHighlighter : public Cantor::DefaultHighlighter
~ScilabHighlighter() override = default;
protected:
void highlightBlock(const QString &text) override;
void highlightBlock(const QString&) override;
QString nonSeparatingCharacters() const override;
private:
Cantor::Session* m_session;
QRegExp commentStartExpression;
QRegExp commentEndExpression;
Cantor::Expression* m_keywordsExpr;
};
#endif /* _SCILABHIGHLIGHTER_H */
......@@ -39,9 +39,10 @@
#include <settings.h>
ScilabSession::ScilabSession( Cantor::Backend* backend) : Session(backend),
m_variableModel(new Cantor::DefaultVariableModel(this))
m_variableModel(new Cantor::DefaultVariableModel(this)),
m_process(nullptr),
m_watch(nullptr)
{
m_process = nullptr;
}
ScilabSession::~ScilabSession()
......@@ -115,7 +116,7 @@ void ScilabSession::logout()
qDebug()<<"logout";
m_process->write("exit\n");
expressionQueue().clear();
QDir removePlotFigures;
......
......@@ -64,6 +64,7 @@ CommandEntry::CommandEntry(Worksheet* worksheet) : WorksheetEntry(worksheet),
m_expression(nullptr),
m_completionObject(nullptr),
m_syntaxHelpObject(nullptr),
m_evaluationOption(DoNothing),
m_menusInitialized(false),
m_backgroundColorActionGroup(nullptr),
m_backgroundColorMenu(nullptr),
......
......@@ -42,7 +42,7 @@ using namespace Cantor;
class Cantor::ExpressionPrivate
{
public:
ExpressionPrivate() : status(Expression::Done), session(nullptr),
ExpressionPrivate() : id(-1), status(Expression::Done), session(nullptr),
finishingBehavior(Expression::DoNotDelete), internal(false), fileWatcher(nullptr)
{
}
......
......@@ -35,15 +35,16 @@
#include "ui_newvardlg.h"
VariableManagerWidget::VariableManagerWidget(Cantor::Session* session, QWidget* parent) : QWidget(parent), m_session(nullptr)
VariableManagerWidget::VariableManagerWidget(Cantor::Session* session, QWidget* parent) : QWidget(parent),
m_session(nullptr),
m_model(nullptr),
m_table(new QTreeView(this))
{
QVBoxLayout* layout=new QVBoxLayout(this);
layout->addWidget(m_table, 1);
m_table=new QTreeView(this);
m_table->setRootIsDecorated(false);
layout->addWidget(m_table, 1);
QHBoxLayout* btnLayout=new QHBoxLayout();
int size=KIconLoader::global()->currentSize(KIconLoader::MainToolbar);
......
......@@ -37,15 +37,15 @@
#include <KSharedConfig>
#include <KTextEditor/View>
#include <KTextEditor/Editor>
// #include <KTextEditor/EditorChooser>
ScriptEditorWidget::ScriptEditorWidget(const QString& filter, const QString& highlightingMode, QWidget* parent) : KXmlGuiWindow(parent)
ScriptEditorWidget::ScriptEditorWidget(const QString& filter, const QString& highlightingMode, QWidget* parent) : KXmlGuiWindow(parent),
m_filter(filter),
m_editor(nullptr),
m_script(nullptr),
m_tmpFile(nullptr)
{
setObjectName(QLatin1String("ScriptEditor"));
m_filter=filter;
m_tmpFile=nullptr;
KStandardAction::openNew(this, SLOT(newScript()), actionCollection());
KStandardAction::open(this, SLOT(open()), actionCollection());
KStandardAction::close(this, SLOT(close()), actionCollection());
......@@ -58,7 +58,6 @@ ScriptEditorWidget::ScriptEditorWidget(const QString& filter, const QString& hig
{
KMessageBox::error(this, i18n("A KDE text-editor component could not be found;\n"
"please check your KDE installation."));
m_script=nullptr;
}
else
{
......
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