Commit c3724fed authored by Kevin Funk's avatar Kevin Funk

Modernize: Use override where possible

parent 3f9f5fa8
......@@ -34,7 +34,7 @@ class ActionBar : public QGraphicsObject
Q_OBJECT
public:
ActionBar(WorksheetEntry* parent);
~ActionBar();
~ActionBar() override;
WorksheetToolButton* addButton(const QIcon& icon, QString toolTip,
QObject* receiver = 0,
......
......@@ -34,7 +34,7 @@ class Animation : public QObject
Q_OBJECT
public:
Animation( QObject* parent=0);
~Animation();
~Animation() override;
void setMovie(QMovie* movie);
QMovie* movie();
......
......@@ -33,7 +33,7 @@ class AnimationResultItem : public WorksheetImageItem, public ResultItem
public:
AnimationResultItem(QGraphicsObject* parent);
~AnimationResultItem();
~AnimationResultItem() override;
using WorksheetImageItem::setGeometry;
double setGeometry(double x, double y, double w) Q_DECL_OVERRIDE;
......
......@@ -31,7 +31,7 @@ class AdvancedPlotAssistant : public Cantor::Assistant
{
public:
AdvancedPlotAssistant( QObject* parent, QList<QVariant> args );
~AdvancedPlotAssistant();
~AdvancedPlotAssistant() override;
void initActions() Q_DECL_OVERRIDE;
......
......@@ -27,7 +27,7 @@ class DifferentiateAssistant : public Cantor::Assistant
{
public:
DifferentiateAssistant( QObject* parent, QList<QVariant> args );
~DifferentiateAssistant();
~DifferentiateAssistant() override;
void initActions() Q_DECL_OVERRIDE;
......
......@@ -27,7 +27,7 @@ class ImportPackageAssistant : public Cantor::Assistant
{
public:
ImportPackageAssistant( QObject* parent, QList<QVariant> args );
~ImportPackageAssistant();
~ImportPackageAssistant() override;
void initActions() Q_DECL_OVERRIDE;
......
......@@ -27,7 +27,7 @@ class IntegrateAssistant : public Cantor::Assistant
{
public:
IntegrateAssistant( QObject* parent, QList<QVariant> args );
~IntegrateAssistant();
~IntegrateAssistant() override;
void initActions() Q_DECL_OVERRIDE;
......
......@@ -27,7 +27,7 @@ class CreateMatrixAssistant : public Cantor::Assistant
{
public:
CreateMatrixAssistant( QObject* parent, QList<QVariant> args );
~CreateMatrixAssistant();
~CreateMatrixAssistant() override;
void initActions() Q_DECL_OVERRIDE;
......
......@@ -29,7 +29,7 @@ class CreateMatrixDlg : public QDialog
Q_OBJECT
public:
CreateMatrixDlg( QWidget* parent);
~CreateMatrixDlg();
~CreateMatrixDlg() override;
int numRows();
int numCols();
......
......@@ -27,7 +27,7 @@ class EigenValuesAssistant : public Cantor::Assistant
{
public:
EigenValuesAssistant( QObject* parent, QList<QVariant> args );
~EigenValuesAssistant();
~EigenValuesAssistant() override;
void initActions() Q_DECL_OVERRIDE;
......
......@@ -27,7 +27,7 @@ class EigenVectorsAssistant : public Cantor::Assistant
{
public:
EigenVectorsAssistant( QObject* parent, QList<QVariant> args );
~EigenVectorsAssistant();
~EigenVectorsAssistant() override;
void initActions() Q_DECL_OVERRIDE;
......
......@@ -27,7 +27,7 @@ class InvertMatrixAssistant : public Cantor::Assistant
{
public:
InvertMatrixAssistant( QObject* parent, QList<QVariant> args );
~InvertMatrixAssistant();
~InvertMatrixAssistant() override;
void initActions() Q_DECL_OVERRIDE;
......
......@@ -27,7 +27,7 @@ class Plot2dAssistant : public Cantor::Assistant
{
public:
Plot2dAssistant( QObject* parent, QList<QVariant> args );
~Plot2dAssistant();
~Plot2dAssistant() override;
void initActions() Q_DECL_OVERRIDE;
......
......@@ -27,7 +27,7 @@ class Plot3dAssistant : public Cantor::Assistant
{
public:
Plot3dAssistant( QObject* parent, QList<QVariant> args );
~Plot3dAssistant();
~Plot3dAssistant() override;
void initActions() Q_DECL_OVERRIDE;
......
......@@ -27,7 +27,7 @@ class RunScriptAssistant : public Cantor::Assistant
{
public:
RunScriptAssistant( QObject* parent, QList<QVariant> args );
~RunScriptAssistant();
~RunScriptAssistant() override;
void initActions() Q_DECL_OVERRIDE;
......
......@@ -27,7 +27,7 @@ class SolveAssistant : public Cantor::Assistant
{
public:
SolveAssistant( QObject* parent, QList<QVariant> args );
~SolveAssistant();
~SolveAssistant() override;
void initActions() Q_DECL_OVERRIDE;
......
......@@ -30,7 +30,7 @@ class BackendChooseDialog : public QDialog
Q_OBJECT
public:
BackendChooseDialog( QWidget* parent);
~BackendChooseDialog();
~BackendChooseDialog() override;
QString backendName();
......
......@@ -28,7 +28,7 @@ class MaximaBackend : public Cantor::Backend
Q_OBJECT
public:
explicit MaximaBackend( QObject* parent = 0,const QList<QVariant> args = QList<QVariant>());
~MaximaBackend();
~MaximaBackend() override;
QString id() const Q_DECL_OVERRIDE;
QString version() const override;
......
......@@ -29,7 +29,7 @@ class MaximaCompletionObject : public Cantor::CompletionObject
{
public:
MaximaCompletionObject( const QString& cmd, int index, MaximaSession* session );
~MaximaCompletionObject();
~MaximaCompletionObject() override;
protected:
bool mayIdentifierContain(QChar c) const Q_DECL_OVERRIDE;
......
......@@ -34,7 +34,7 @@ class MaximaExpression : public Cantor::Expression
Q_OBJECT
public:
explicit MaximaExpression( Cantor::Session* session);
~MaximaExpression();
~MaximaExpression() override;
void evaluate() Q_DECL_OVERRIDE;
void interrupt() Q_DECL_OVERRIDE;
......
......@@ -27,7 +27,7 @@ class MaximaHistoryExtension : public Cantor::HistoryExtension
{
public:
MaximaHistoryExtension( QObject* parent );
~MaximaHistoryExtension();
~MaximaHistoryExtension() override;
public Q_SLOTS:
QString lastResult() Q_DECL_OVERRIDE;
};
......@@ -36,7 +36,7 @@ class MaximaScriptExtension : public Cantor::ScriptExtension
{
public:
MaximaScriptExtension(QObject* parent);
~MaximaScriptExtension();
~MaximaScriptExtension() override;
public Q_SLOTS:
QString runExternalScript(const QString& file) Q_DECL_OVERRIDE;
QString scriptFileFilter() Q_DECL_OVERRIDE;
......@@ -50,7 +50,7 @@ class MaximaCASExtension : public Cantor::CASExtension
{
public:
MaximaCASExtension( QObject* parent);
~MaximaCASExtension();
~MaximaCASExtension() override;
public Q_SLOTS:
QString solve(const QStringList& equations, const QStringList& variables) Q_DECL_OVERRIDE;
......@@ -63,7 +63,7 @@ class MaximaCalculusExtension : public Cantor::CalculusExtension
{
public:
MaximaCalculusExtension( QObject* parent);
~MaximaCalculusExtension();
~MaximaCalculusExtension() override;
public Q_SLOTS:
QString limit(const QString& expression, const QString& variable, const QString& limit) Q_DECL_OVERRIDE;
......@@ -78,7 +78,7 @@ class MaximaLinearAlgebraExtension : public Cantor::LinearAlgebraExtension
{
public:
MaximaLinearAlgebraExtension(QObject* parent);
~MaximaLinearAlgebraExtension();
~MaximaLinearAlgebraExtension() override;
public Q_SLOTS:
//Commands to create Vectors/Matrices
......@@ -99,7 +99,7 @@ class MaximaPlotExtension : public Cantor::PlotExtension
{
public:
MaximaPlotExtension(QObject* parent);
~MaximaPlotExtension();
~MaximaPlotExtension() override;
public Q_SLOTS:
QString plotFunction2d(const QString& function, const QString& variable, const QString& left, const QString& right) Q_DECL_OVERRIDE;
QString plotFunction3d(const QString& function, VariableParameter var1, VariableParameter var2) Q_DECL_OVERRIDE;
......@@ -109,7 +109,7 @@ class MaximaVariableManagementExtension : public Cantor::VariableManagementExten
{
public:
MaximaVariableManagementExtension( QObject* parent );
~MaximaVariableManagementExtension();
~MaximaVariableManagementExtension() override;
public Q_SLOTS:
QString addVariable(const QString& name, const QString& value) Q_DECL_OVERRIDE;
......
......@@ -29,7 +29,7 @@ class MaximaHighlighter : public Cantor::DefaultHighlighter
Q_OBJECT
public:
MaximaHighlighter( QObject* parent, MaximaSession* session);
~MaximaHighlighter();
~MaximaHighlighter() override;
protected:
void highlightBlock(const QString &text) Q_DECL_OVERRIDE;
......
......@@ -41,7 +41,7 @@ class MaximaSession : public Cantor::Session
static const QRegExp MaximaOutputPrompt;
MaximaSession( Cantor::Backend* backend);
~MaximaSession();
~MaximaSession() override;
void login() Q_DECL_OVERRIDE;
void logout() Q_DECL_OVERRIDE;
......
......@@ -32,7 +32,7 @@ class MaximaSyntaxHelpObject : public Cantor::SyntaxHelpObject
Q_OBJECT
public:
MaximaSyntaxHelpObject( const QString& command, MaximaSession* session );
~MaximaSyntaxHelpObject();
~MaximaSyntaxHelpObject() override;
protected Q_SLOTS:
void fetchInformation() Q_DECL_OVERRIDE;
......
......@@ -34,7 +34,7 @@ class MaximaVariableModel : public Cantor::DefaultVariableModel
static const QString variableInspectCommand;
MaximaVariableModel( MaximaSession* session);
~MaximaVariableModel();
~MaximaVariableModel() override;
QList<Variable> variables();
QList<Variable> functions();
......
......@@ -28,7 +28,7 @@ class NullBackend : public Cantor::Backend
Q_OBJECT
public:
explicit NullBackend( QObject* parent = 0,const QList<QVariant> args = QList<QVariant>());
~NullBackend();
~NullBackend() override;
QString id() const Q_DECL_OVERRIDE;
......
......@@ -29,7 +29,7 @@ class NullCompletionObject : public Cantor::CompletionObject
{
public:
NullCompletionObject( const QString& command, int index, NullSession* session);
~NullCompletionObject();
~NullCompletionObject() override;
protected Q_SLOTS:
void fetchCompletions() Q_DECL_OVERRIDE;
......
......@@ -30,7 +30,7 @@ class NullExpression : public Cantor::Expression
Q_OBJECT
public:
NullExpression( Cantor::Session* session);
~NullExpression();
~NullExpression() override;
void evaluate() Q_DECL_OVERRIDE;
void interrupt() Q_DECL_OVERRIDE;
......
......@@ -31,7 +31,7 @@ class NullSession : public Cantor::Session
Q_OBJECT
public:
NullSession( Cantor::Backend* backend);
~NullSession();
~NullSession() override;
void login() Q_DECL_OVERRIDE;
void logout() Q_DECL_OVERRIDE;
......
......@@ -27,9 +27,9 @@ class OctaveBackend : public Cantor::Backend
Q_OBJECT
public:
explicit OctaveBackend( QObject* parent = 0,const QList<QVariant> args = QList<QVariant>());
~OctaveBackend();
~OctaveBackend() override;
QString id() const Q_DECL_OVERRIDE;
virtual QString version() const override;
QString version() const override;
Cantor::Backend::Capabilities capabilities() const Q_DECL_OVERRIDE;
Cantor::Session* createSession() Q_DECL_OVERRIDE;
......
......@@ -32,7 +32,7 @@ class OctaveCompletionObject : public Cantor::CompletionObject
Q_OBJECT
public:
OctaveCompletionObject(const QString& command, int index, Cantor::Session* parent);
virtual ~OctaveCompletionObject();
~OctaveCompletionObject() override;
protected:
void fetchCompletions() Q_DECL_OVERRIDE;
......
......@@ -38,7 +38,7 @@ class OctaveExpression : public Cantor::Expression
Q_OBJECT
public:
OctaveExpression(Cantor::Session* session);
~OctaveExpression();
~OctaveExpression() override;
void interrupt() Q_DECL_OVERRIDE;
void evaluate() Q_DECL_OVERRIDE;
void parseOutput ( QString output );
......
......@@ -34,7 +34,7 @@ class OctaveHighlighter : public Cantor::DefaultHighlighter
public:
OctaveHighlighter(QObject* parent, Cantor::Session* session);
virtual ~OctaveHighlighter();
~OctaveHighlighter() override;
public Q_SLOTS:
void receiveFunctions();
......
......@@ -40,7 +40,7 @@ class OctaveSession : public Cantor::Session
Q_OBJECT
public:
OctaveSession(Cantor::Backend* backend);
~OctaveSession();
~OctaveSession() override;
void interrupt() Q_DECL_OVERRIDE;
Cantor::Expression* evaluateExpression(const QString& command, Cantor::Expression::FinishingBehavior finishingBehavior) Q_DECL_OVERRIDE;
void logout() Q_DECL_OVERRIDE;
......
......@@ -32,7 +32,7 @@ class OctaveSyntaxHelpObject : public Cantor::SyntaxHelpObject
Q_OBJECT
public:
OctaveSyntaxHelpObject(const QString& command, Cantor::Session* session);
virtual ~OctaveSyntaxHelpObject();
~OctaveSyntaxHelpObject() override;
protected:
void fetchInformation() Q_DECL_OVERRIDE;
......
......@@ -28,7 +28,7 @@ class CANTOR_EXPORT PythonBackend : public Cantor::Backend
Q_OBJECT
public:
explicit PythonBackend(QObject* parent = nullptr, const QList<QVariant> args = QList<QVariant>());
~PythonBackend();
~PythonBackend() override;
Cantor::Backend::Capabilities capabilities() const Q_DECL_OVERRIDE;
......
......@@ -29,7 +29,7 @@ class PythonCompletionObject : public Cantor::CompletionObject
{
public:
PythonCompletionObject(const QString& cmd, int index, PythonSession* session);
~PythonCompletionObject();
~PythonCompletionObject() override;
protected:
bool mayIdentifierContain(QChar c) const Q_DECL_OVERRIDE;
......
......@@ -31,7 +31,7 @@ class PythonExpression : public Cantor::Expression
Q_OBJECT
public:
PythonExpression(Cantor::Session* session);
~PythonExpression();
~PythonExpression() override;
void evaluate() Q_DECL_OVERRIDE;
void interrupt() Q_DECL_OVERRIDE;
......
......@@ -29,7 +29,7 @@ class PythonHighlighter : public Cantor::DefaultHighlighter
public:
PythonHighlighter(QObject* parent);
~PythonHighlighter();
~PythonHighlighter() override;
public Q_SLOTS:
void updateHighlight();
......
......@@ -37,7 +37,7 @@ class CANTOR_EXPORT PythonSession : public Cantor::Session
Q_OBJECT
public:
PythonSession(Cantor::Backend* backend);
~PythonSession();
~PythonSession() override;
void login() Q_DECL_OVERRIDE;
void logout() Q_DECL_OVERRIDE;
......
......@@ -28,14 +28,14 @@ class Python3Backend : public PythonBackend
public:
explicit Python3Backend(QObject* parent = nullptr, const QList<QVariant> args = QList<QVariant>());
Cantor::Session* createSession();
Cantor::Session* createSession() override;
QString id() const;
QString id() const override;
QString version() const override;
QUrl helpUrl() const;
QString description() const;
QUrl helpUrl() const override;
QString description() const override;
KConfigSkeleton* config() const;
KConfigSkeleton* config() const override;
};
#endif
......@@ -31,19 +31,19 @@ class Python3Session : public PythonSession
public:
Python3Session(Cantor::Backend* backend);
void login();
void logout();
void interrupt();
void login() override;
void logout() override;
void interrupt() override;
bool integratePlots() const;
QStringList autorunScripts() const;
bool integratePlots() const override;
QStringList autorunScripts() const override;
private:
void runPythonCommand(const QString& command) const;
void readExpressionOutput(const QString& commandProcessing);
void runPythonCommand(const QString& command) const override;
void readExpressionOutput(const QString& commandProcessing) override;
QString getOutput() const;
QString getError() const;
QString getOutput() const override;
QString getError() const override;
private:
QDBusInterface* m_pIface;
......
......@@ -32,7 +32,7 @@ class TestPython3 : public BackendTest
void testPython3Code();
private:
virtual QString backendName();
QString backendName() override;
};
#endif /* _TESTPYTHON3_H */
......@@ -28,7 +28,7 @@ class SageBackend : public Cantor::Backend
Q_OBJECT
public:
explicit SageBackend( QObject* parent = 0,const QList<QVariant> args = QList<QVariant>());
~SageBackend();
~SageBackend() override;
QString id() const Q_DECL_OVERRIDE;
QString version() const override;
......
......@@ -34,7 +34,7 @@ class SageCompletionObject : public Cantor::CompletionObject
Q_OBJECT
public:
SageCompletionObject( const QString& command, int index, SageSession* session);
~SageCompletionObject();
~SageCompletionObject() override;
protected:
bool mayIdentifierContain(QChar c) const Q_DECL_OVERRIDE;
......
......@@ -28,7 +28,7 @@ class SageExpression : public Cantor::Expression
Q_OBJECT
public:
SageExpression( Cantor::Session* session);
~SageExpression();
~SageExpression() override;
void evaluate() Q_DECL_OVERRIDE;
void interrupt() Q_DECL_OVERRIDE;
......
......@@ -27,7 +27,7 @@ class SageHistoryExtension : public Cantor::HistoryExtension
{
public:
SageHistoryExtension( QObject* parent );
~SageHistoryExtension();
~SageHistoryExtension() override;
public Q_SLOTS:
QString lastResult() Q_DECL_OVERRIDE;
};
......@@ -36,7 +36,7 @@ class SageScriptExtension : public Cantor::ScriptExtension
{
public:
SageScriptExtension(QObject* parent);
~SageScriptExtension();
~SageScriptExtension() override;
public Q_SLOTS:
QString runExternalScript(const QString& path) Q_DECL_OVERRIDE;
QString scriptFileFilter() Q_DECL_OVERRIDE;
......@@ -47,7 +47,7 @@ class SageCASExtension : public Cantor::CASExtension
{
public:
SageCASExtension( QObject* parent);
~SageCASExtension();
~SageCASExtension() override;
public Q_SLOTS:
QString solve(const QStringList& equations, const QStringList& variables) Q_DECL_OVERRIDE;
......@@ -60,7 +60,7 @@ class SageCalculusExtension : public Cantor::CalculusExtension
{
public:
SageCalculusExtension( QObject* parent);
~SageCalculusExtension();
~SageCalculusExtension() override;
public Q_SLOTS:
QString limit(const QString& expression, const QString& variable, const QString& limit) Q_DECL_OVERRIDE;
......@@ -73,7 +73,7 @@ class SageLinearAlgebraExtension : public Cantor::LinearAlgebraExtension
{
public:
SageLinearAlgebraExtension( QObject* parent);
~SageLinearAlgebraExtension();
~SageLinearAlgebraExtension() override;
public Q_SLOTS:
//Commands to create Vectors/Matrices
......@@ -95,7 +95,7 @@ class SagePlotExtension : public Cantor::PlotExtension
{
public:
SagePlotExtension(QObject* parent);
~SagePlotExtension();
~SagePlotExtension() override;
public Q_SLOTS:
QString plotFunction2d(const QString& function, const QString& variable, const QString& left, const QString& right) Q_DECL_OVERRIDE;
QString plotFunction3d(const QString& function, VariableParameter var1, VariableParameter var2) Q_DECL_OVERRIDE;
......@@ -105,7 +105,7 @@ class SagePackagingExtension : public Cantor::PackagingExtension
{
public:
SagePackagingExtension(QObject* parent);
~SagePackagingExtension();
~SagePackagingExtension() override;
public Q_SLOTS:
QString importPackage(const QString& module) Q_DECL_OVERRIDE;
......
......@@ -34,7 +34,7 @@ class SageHighlighter : public Cantor::DefaultHighlighter
{
public:
SageHighlighter( QObject* parent);
~SageHighlighter();
~SageHighlighter() override;
};
#endif /* _SAGEHIGHLIGHTER_H */