Commit 8f1d312f authored by Filip Gawin's avatar Filip Gawin
Browse files

Cleanup inheritance specifiers

Adds `override` if it is missing,
removes `virtual` if it's unneeded,
also converts:
`virtual foo();`
to:
`foo() override`
in descendant classes.
parent 7846a5a5
......@@ -181,7 +181,7 @@ public:
}
}
virtual void setSelectedDocumentation(bool s) override { m_selectedDocumentation = s; }
void setSelectedDocumentation(bool s) override { m_selectedDocumentation = s; }
QVariant data(const QModelIndex &index, int role) const override
{
......
......@@ -433,7 +433,7 @@ public:
updateState();
}
~LSPClientActionView()
~LSPClientActionView() override
{
// unregister all code-completion providers, else we might crash
for (auto view : qAsConst(m_completionViews)) {
......@@ -1687,7 +1687,7 @@ public:
m_mainWindow->guiFactory()->addClient(this);
}
~LSPClientPluginViewImpl()
~LSPClientPluginViewImpl() override
{
// minimize/avoid some surprises;
// safe construction/destruction by separate (helper) objects;
......
......@@ -102,7 +102,7 @@ public:
LSPClientServer(const QStringList &server, const QUrl &root,
const QJsonValue &init = QJsonValue());
~LSPClientServer();
~LSPClientServer() override;
// server management
// request start
......
......@@ -306,7 +306,7 @@ public:
QTimer::singleShot(100, this, &self_type::updateServerConfig);
}
~LSPClientServerManagerImpl()
~LSPClientServerManagerImpl() override
{
// stop everything as we go down
// several stages;
......@@ -402,13 +402,13 @@ public:
restart(servers);
}
virtual qint64 revision(KTextEditor::Document *doc) override
qint64 revision(KTextEditor::Document *doc) override
{
auto it = m_docs.find(doc);
return it != m_docs.end() ? it->version : -1;
}
virtual LSPClientRevisionSnapshot *snapshot(LSPClientServer *server) override
LSPClientRevisionSnapshot *snapshot(LSPClientServer *server) override
{
auto result = new LSPClientRevisionSnapshotImpl;
for (auto it = m_docs.begin(); it != m_docs.end(); ++it) {
......
......@@ -41,7 +41,7 @@ protected:
KateProject *m_project = nullptr;
public:
virtual ~KateProjectCodeAnalysisTool();
~KateProjectCodeAnalysisTool() override;
/**
* bind to this project
......
......@@ -31,25 +31,25 @@ class KateProjectCodeAnalysisToolCppcheck: public KateProjectCodeAnalysisTool
public:
explicit KateProjectCodeAnalysisToolCppcheck(QObject *parent = nullptr);
virtual ~KateProjectCodeAnalysisToolCppcheck() override;
~KateProjectCodeAnalysisToolCppcheck() override;
virtual QString name() const override;
QString name() const override;
virtual QString description() const override;
QString description() const override;
virtual QString fileExtensions() const override;
QString fileExtensions() const override;
virtual QStringList filter(const QStringList &files) const override;
virtual QString path() const override;
QString path() const override;
virtual QStringList arguments() override;
QStringList arguments() override;
virtual QString notInstalledMessage() const override;
QString notInstalledMessage() const override;
virtual QStringList parseLine(const QString &line) const override;
QStringList parseLine(const QString &line) const override;
virtual QString stdinMessages() override;
QString stdinMessages() override;
};
#endif // KATE_PROJECT_CODE_ANALYSIS_TOOL_CPPCHECK_H
......@@ -31,25 +31,25 @@ class KateProjectCodeAnalysisToolFlake8: public KateProjectCodeAnalysisTool
public:
explicit KateProjectCodeAnalysisToolFlake8(QObject *parent = nullptr);
virtual ~KateProjectCodeAnalysisToolFlake8() override;
~KateProjectCodeAnalysisToolFlake8() override;
virtual QString name() const override;
QString name() const override;
virtual QString description() const override;
QString description() const override;
virtual QString fileExtensions() const override;
QString fileExtensions() const override;
virtual QStringList filter(const QStringList &files) const override;
virtual QString path() const override;
QString path() const override;
virtual QStringList arguments() override;
QStringList arguments() override;
virtual QString notInstalledMessage() const override;
QString notInstalledMessage() const override;
virtual QStringList parseLine(const QString &line) const override;
QStringList parseLine(const QString &line) const override;
virtual QString stdinMessages() override;
QString stdinMessages() override;
};
#endif // KATE_PROJECT_CODE_ANALYSIS_TOOL_FLAKE8_H
......@@ -30,25 +30,25 @@ class KateProjectCodeAnalysisToolShellcheck : public KateProjectCodeAnalysisTool
public:
explicit KateProjectCodeAnalysisToolShellcheck(QObject *parent = nullptr);
virtual ~KateProjectCodeAnalysisToolShellcheck() override;
~KateProjectCodeAnalysisToolShellcheck() override;
virtual QString name() const override;
QString name() const override;
virtual QString description() const override;
QString description() const override;
virtual QString fileExtensions() const override;
QString fileExtensions() const override;
virtual QStringList filter(const QStringList &files) const override;
virtual QString path() const override;
QString path() const override;
virtual QStringList arguments() override;
QStringList arguments() override;
virtual QString notInstalledMessage() const override;
QString notInstalledMessage() const override;
virtual QStringList parseLine(const QString &line) const override;
QStringList parseLine(const QString &line) const override;
virtual bool isSuccessfulExitCode(int exitCode) const override;
bool isSuccessfulExitCode(int exitCode) const override;
virtual QString stdinMessages() override;
QString stdinMessages() override;
};
......@@ -57,7 +57,7 @@ class TabswitcherFilesModel : public QAbstractTableModel
public:
explicit TabswitcherFilesModel(QObject *parent = nullptr);
virtual ~TabswitcherFilesModel() = default;
~TabswitcherFilesModel() override = default;
bool insertDocument(int row, KTextEditor::Document * document);
bool removeDocument(KTextEditor::Document * document);
......
......@@ -29,7 +29,7 @@ class TsTestApp : public QMainWindow
public:
explicit TsTestApp(QWidget *parent = nullptr);
~TsTestApp();
~TsTestApp() override;
private:
class Impl;
......
......@@ -34,7 +34,7 @@ class KWriteApplication : public QObject
public:
KWriteApplication();
~KWriteApplication();
~KWriteApplication() override;
void addDocument(KTextEditor::Document *doc) { m_documents.append(doc); }
void removeDocument(KTextEditor::Document *doc) { m_documents.removeAll(doc); }
......
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