Commit 93fd6fb5 authored by Kevin Funk's avatar Kevin Funk

clang-tidy: modernize-use-override

parent 50dc411a
......@@ -37,7 +37,7 @@ class KDevelopSessionsEngine : public Plasma::DataEngine
public:
KDevelopSessionsEngine(QObject *parent, const QVariantList &args);
~KDevelopSessionsEngine();
~KDevelopSessionsEngine() override;
void init();
Plasma::Service *serviceForSource(const QString &source) override;
......
......@@ -37,7 +37,7 @@ class KDevelopSessions : public Plasma::AbstractRunner {
public:
KDevelopSessions( QObject *parent, const QVariantList& args );
~KDevelopSessions();
~KDevelopSessions() override;
void match(Plasma::RunnerContext &context) override;
void run(const Plasma::RunnerContext &context, const Plasma::QueryMatch &match) override;
......
......@@ -33,7 +33,7 @@ class KDevSplashScreen : public QQuickView
Q_OBJECT
public:
explicit KDevSplashScreen();
virtual ~KDevSplashScreen();
~KDevSplashScreen() override;
public slots:
void progress(int progress);
......
......@@ -78,7 +78,7 @@ struct BreakpointController::Handler : public GDBCommandHandler
breakpoint->dirty &= ~columns;
}
virtual void handle(const ResultRecord& r) override
void handle(const ResultRecord& r) override
{
breakpoint->sent &= ~columns;
......@@ -104,7 +104,7 @@ struct BreakpointController::Handler : public GDBCommandHandler
}
}
virtual bool handlesError() override
bool handlesError() override
{
return true;
}
......@@ -140,7 +140,7 @@ struct BreakpointController::InsertedHandler : public BreakpointController::Hand
InsertedHandler(BreakpointController* c, const BreakpointDataPtr& b, BreakpointModel::ColumnFlags columns)
: Handler(c, b, columns) {}
virtual void handle(const GDBMI::ResultRecord &r) override
void handle(const GDBMI::ResultRecord &r) override
{
Handler::handle(r);
......@@ -185,7 +185,7 @@ struct BreakpointController::DeleteHandler : BreakpointController::Handler {
DeleteHandler(BreakpointController* c, const BreakpointDataPtr& b)
: Handler(c, b, 0) {}
virtual void handle(const ResultRecord&) override
void handle(const ResultRecord&) override
{
controller->m_pendingDeleted.removeAll(breakpoint);
}
......
......@@ -92,22 +92,22 @@ public:
: m_plugin(plugin), m_id(id), m_defaultArea(defaultArea)
{}
virtual QWidget* create(QWidget *parent = 0) override
QWidget* create(QWidget *parent = 0) override
{
return new T(m_plugin, parent);
}
virtual QString id() const override
QString id() const override
{
return m_id;
}
virtual Qt::DockWidgetArea defaultPosition() override
Qt::DockWidgetArea defaultPosition() override
{
return m_defaultArea;
}
virtual void viewCreated(Sublime::View* view) override
void viewCreated(Sublime::View* view) override
{
if (view->widget()->metaObject()->indexOfSignal(QMetaObject::normalizedSignature("requestRaise()")) != -1)
QObject::connect(view->widget(), SIGNAL(requestRaise()), view, SLOT(requestRaise()));
......@@ -115,7 +115,7 @@ public:
/* At present, some debugger widgets (e.g. breakpoint) contain actions so that shortcuts
work, but they don't need any toolbar. So, suppress toolbar action. */
virtual QList<QAction*> toolBarActions( QWidget* viewWidget ) const override
QList<QAction*> toolBarActions( QWidget* viewWidget ) const override
{
Q_UNUSED(viewWidget);
return QList<QAction*>();
......
......@@ -67,17 +67,17 @@ public:
friend class DebugSession;
CppDebuggerPlugin( QObject *parent, const QVariantList & = QVariantList() );
~CppDebuggerPlugin();
~CppDebuggerPlugin() override;
virtual void unload() override;
void unload() override;
virtual KDevelop::ContextMenuExtension contextMenuExtension( KDevelop::Context* ) override;
KDevelop::ContextMenuExtension contextMenuExtension( KDevelop::Context* ) override;
DebugSession *createSession();
public:
//BEGIN IStatus
virtual QString statusName() const override;
QString statusName() const override;
Q_SIGNALS:
void clearMessage(KDevelop::IStatus*) override;
......@@ -124,7 +124,7 @@ Q_SIGNALS:
void jumpTo(const QUrl &url, int line);
protected:
virtual void initializeGuiState() override;
void initializeGuiState() override;
private:
KConfigGroup config() const;
......
......@@ -44,9 +44,9 @@ Q_OBJECT
public:
DebugJob( GDBDebugger::CppDebuggerPlugin* p, KDevelop::ILaunchConfiguration* launchcfg,
IExecutePlugin* plugin, QObject* parent = 0 );
virtual void start() override;
void start() override;
protected:
virtual bool doKill() override;
bool doKill() override;
private slots:
void stdoutReceived(const QStringList&);
void stderrReceived(const QStringList&);
......@@ -64,9 +64,9 @@ class KillSessionJob : public KJob
Q_OBJECT
public:
KillSessionJob(DebugSession *session, QObject *parent = 0);
virtual void start() override;
void start() override;
protected:
virtual bool doKill() override;
bool doKill() override;
private:
DebugSession* m_session;
private slots:
......
......@@ -70,15 +70,15 @@ class DebugSession : public KDevelop::IDebugSession
Q_OBJECT
public:
DebugSession();
~DebugSession();
~DebugSession() override;
virtual DebuggerState state() const override;
DebuggerState state() const override;
virtual bool restartAvaliable() const override;
bool restartAvaliable() const override;
virtual BreakpointController* breakpointController() const override;
virtual KDevelop::IVariableController* variableController() const override;
virtual KDevelop::IFrameStackModel* frameStackModel() const override;
BreakpointController* breakpointController() const override;
KDevelop::IVariableController* variableController() const override;
KDevelop::IFrameStackModel* frameStackModel() const override;
using IDebugSession::event;
Q_SIGNALS:
......@@ -93,17 +93,17 @@ public Q_SLOTS:
* Start the debugger, and execute the program specified by \a run.
*/
bool startProgram(KDevelop::ILaunchConfiguration* run, IExecutePlugin* execute);
virtual void restartDebugger() override;
virtual void stopDebugger() override;
virtual void interruptDebugger() override;
virtual void run() override;
virtual void runToCursor() override;
virtual void jumpToCursor() override;
virtual void stepOver() override;
virtual void stepIntoInstruction() override;
virtual void stepInto() override;
virtual void stepOverInstruction() override;
virtual void stepOut() override;
void restartDebugger() override;
void stopDebugger() override;
void interruptDebugger() override;
void run() override;
void runToCursor() override;
void jumpToCursor() override;
void stepOver() override;
void stepIntoInstruction() override;
void stepInto() override;
void stepOverInstruction() override;
void stepOut() override;
/**
* Start the debugger and examine the core file given by \a coreFile.
......
......@@ -76,7 +76,7 @@ public:
DisassembleWindow(QWidget *parent, DisassembleWidget* widget);
protected:
virtual void contextMenuEvent(QContextMenuEvent *e) override;
void contextMenuEvent(QContextMenuEvent *e) override;
private:
QAction* m_selectAddrAction;
......@@ -103,7 +103,7 @@ public:
};
DisassembleWidget( CppDebuggerPlugin* plugin, QWidget *parent=0 );
virtual ~DisassembleWidget();
~DisassembleWidget() override;
Q_SIGNALS:
void requestRaise();
......@@ -122,8 +122,8 @@ private Q_SLOTS:
void currentSessionChanged(KDevelop::IDebugSession* session);
protected:
virtual void showEvent(QShowEvent*) override;
virtual void hideEvent(QHideEvent*) override;
void showEvent(QShowEvent*) override;
void hideEvent(QHideEvent*) override;
void enableControls(bool enabled);
private:
......
......@@ -41,7 +41,7 @@ class GDB : public QObject
Q_OBJECT
public:
explicit GDB(QObject* parent = 0);
virtual ~GDB();
~GDB() override;
/** Starts GDB. This should be done after connecting to all
signals the client is interested in. */
......
......@@ -48,7 +48,7 @@ class DebugSession;
class GdbConfigPageFactory : public KDevelop::LaunchConfigurationPageFactory
{
public:
virtual KDevelop::LaunchConfigurationPage* createWidget(QWidget* parent) override;
KDevelop::LaunchConfigurationPage* createWidget(QWidget* parent) override;
};
class GdbConfigPage : public KDevelop::LaunchConfigurationPage
......@@ -56,11 +56,11 @@ class GdbConfigPage : public KDevelop::LaunchConfigurationPage
Q_OBJECT
public:
GdbConfigPage( QWidget* parent = 0 );
virtual ~GdbConfigPage();
virtual QIcon icon() const override;
virtual void loadFromConfiguration(const KConfigGroup& cfg, KDevelop::IProject* = 0) override;
virtual void saveToConfiguration(KConfigGroup, KDevelop::IProject* = 0 ) const override;
virtual QString title() const override;
~GdbConfigPage() override;
QIcon icon() const override;
void loadFromConfiguration(const KConfigGroup& cfg, KDevelop::IProject* = 0) override;
void saveToConfiguration(KConfigGroup, KDevelop::IProject* = 0 ) const override;
QString title() const override;
private:
Ui::GdbConfigPage* ui;
};
......@@ -69,12 +69,12 @@ class GdbLauncher : public KDevelop::ILauncher
{
public:
GdbLauncher( GDBDebugger::CppDebuggerPlugin* plugin, IExecutePlugin* execute );
virtual QList< KDevelop::LaunchConfigurationPageFactory* > configPages() const override;
virtual QString description() const override;
virtual QString id() override;
virtual QString name() const override;
virtual KJob* start(const QString& launchMode, KDevelop::ILaunchConfiguration* cfg) override;
virtual QStringList supportedModes() const override;
QList< KDevelop::LaunchConfigurationPageFactory* > configPages() const override;
QString description() const override;
QString id() override;
QString name() const override;
KJob* start(const QString& launchMode, KDevelop::ILaunchConfiguration* cfg) override;
QStringList supportedModes() const override;
private:
QList<KDevelop::LaunchConfigurationPageFactory*> factoryList;
GDBDebugger::CppDebuggerPlugin* m_plugin;
......
......@@ -89,7 +89,7 @@ struct FrameListHandler : public GDBCommandHandler
FrameListHandler(GdbFrameStackModel* frames, int thread, int to)
: m_frames(frames), m_thread(thread) , m_to(to) {}
virtual void handle(const GDBMI::ResultRecord &r) override
void handle(const GDBMI::ResultRecord &r) override
{
const GDBMI::Value& stack = r["stack"];
int first = stack[0]["level"].toInt();
......
......@@ -51,7 +51,7 @@ class GDBOutputWidget : public QWidget
public:
GDBOutputWidget(CppDebuggerPlugin* plugin, QWidget *parent=0 );
~GDBOutputWidget();
~GDBOutputWidget() override;
void savePartialProjectSession();
void restorePartialProjectSession();
......@@ -78,8 +78,8 @@ private Q_SLOTS:
void updateColors();
protected:
virtual void focusInEvent(QFocusEvent *e) override;
virtual void contextMenuEvent(QContextMenuEvent* e) override;
void focusInEvent(QFocusEvent *e) override;
void contextMenuEvent(QContextMenuEvent* e) override;
Q_SIGNALS:
void requestRaise();
......@@ -149,7 +149,7 @@ public:
OutputTextEdit(GDBOutputWidget* parent);
protected:
virtual void contextMenuEvent(QContextMenuEvent* event) override;
void contextMenuEvent(QContextMenuEvent* event) override;
};
}
......
......@@ -96,7 +96,7 @@ public:
: m_variable(variable), m_callback(callback), m_callbackMethod(callbackMethod)
{}
virtual void handle(const GDBMI::ResultRecord &r) override
void handle(const GDBMI::ResultRecord &r) override
{
if (!m_variable) return;
bool hasValue = false;
......@@ -139,7 +139,7 @@ public:
QMetaObject::invokeMethod(m_callback, m_callbackMethod, Q_ARG(bool, hasValue));
}
}
virtual bool handlesError() override { return true; }
bool handlesError() override { return true; }
private:
QPointer<GdbVariable> m_variable;
......@@ -180,7 +180,7 @@ public:
: m_variable(variable), m_session(session), m_activeCommands(1)
{}
virtual void handle(const GDBMI::ResultRecord &r) override
void handle(const GDBMI::ResultRecord &r) override
{
if (!m_variable) return;
--m_activeCommands;
......@@ -230,11 +230,11 @@ public:
delete this;
}
}
virtual bool handlesError() override {
bool handlesError() override {
// FIXME: handle error?
return false;
}
virtual bool autoDelete() override {
bool autoDelete() override {
// we delete ourselve
return false;
}
......@@ -348,7 +348,7 @@ public:
: m_variable(var)
{}
virtual void handle(const GDBMI::ResultRecord &r) override
void handle(const GDBMI::ResultRecord &r) override
{
if(r.hasField("value"))
m_variable.data()->setValue(r["value"].literal());
......
......@@ -33,9 +33,9 @@ class ProcessSelectionDialog : public QDialog
Q_OBJECT
public:
ProcessSelectionDialog( QWidget *parent=0 );
~ProcessSelectionDialog();
~ProcessSelectionDialog() override;
long int pidSelected();
QSize sizeHint() const;
QSize sizeHint() const override;
private slots:
void selectionChanged();
......
......@@ -50,7 +50,7 @@ class ModelsManager : public QObject
public:
explicit ModelsManager(QObject* parent = 0);
virtual ~ModelsManager();
~ModelsManager() override;
///Adds new @p view with @p name, if not yet registered.
///All views removed after debug session ended.
......
......@@ -205,7 +205,7 @@ protected:
QString numberForName(const QString& name) const;
public:
virtual ~IRegisterController();
~IRegisterController() override;
private :
///Handles initialization of register's names.
......
......@@ -51,7 +51,7 @@ public slots:
protected:
///Allows to choose register formates/modes.
virtual void contextMenuEvent(QContextMenuEvent* e) override;
void contextMenuEvent(QContextMenuEvent* e) override;
private:
///Returns list of active views.
......
......@@ -41,7 +41,7 @@ class STTY : public QObject
public:
STTY(bool ext=false, const QString &termAppName=QString());
~STTY();
~STTY() override;
///Call it if getSlave returns an empty string.
QString lastError(){return m_lastError;}
......
......@@ -139,14 +139,14 @@ public:
cfg.writeEntry("Executable", executable);
cfg.writeEntry("Working Directory", workingDirectory);
}
~TestLaunchConfiguration() {
~TestLaunchConfiguration() override {
delete c;
}
virtual const KConfigGroup config() const override { return cfg; }
virtual KConfigGroup config() override { return cfg; };
virtual QString name() const override { return QString("Test-Launch"); }
virtual KDevelop::IProject* project() const override { return 0; }
virtual KDevelop::LaunchConfigurationType* type() const override { return 0; }
const KConfigGroup config() const override { return cfg; }
KConfigGroup config() override { return cfg; };
QString name() const override { return QString("Test-Launch"); }
KDevelop::IProject* project() const override { return 0; }
KDevelop::LaunchConfigurationType* type() const override { return 0; }
private:
KConfigGroup cfg;
KConfig *c;
......@@ -161,13 +161,13 @@ public:
int fetchFramesCalled;
int fetchThreadsCalled;
virtual void fetchFrames(int threadNumber, int from, int to) override
void fetchFrames(int threadNumber, int from, int to) override
{
fetchFramesCalled++;
GdbFrameStackModel::fetchFrames(threadNumber, from, to);
}
virtual void fetchThreads() override
void fetchThreads() override
{
fetchThreadsCalled++;
GdbFrameStackModel::fetchThreads();
......@@ -188,7 +188,7 @@ public:
QUrl url() { return currentUrl(); }
int line() { return currentLine(); }
virtual TestFrameStackModel* frameStackModel() const override
TestFrameStackModel* frameStackModel() const override
{
return m_frameStackModel;
}
......
......@@ -107,7 +107,7 @@ public:
: m_localsName(localsName)
{}
virtual void handle(const GDBMI::ResultRecord &r) override
void handle(const GDBMI::ResultRecord &r) override
{
if (!KDevelop::ICore::self()->debugController()) return; //happens on shutdown
......@@ -135,7 +135,7 @@ public:
: m_session(session)
{}
virtual void handle(const GDBMI::ResultRecord &r) override
void handle(const GDBMI::ResultRecord &r) override
{
// FIXME: handle error.
......
......@@ -48,13 +48,13 @@ class VariableController : public KDevelop::IVariableController
public:
VariableController(DebugSession* parent);
virtual Variable* createVariable(TreeModel* model, TreeItem* parent,
Variable* createVariable(TreeModel* model, TreeItem* parent,
const QString& expression,
const QString& display = "") override;
virtual KTextEditor::Range expressionRangeUnderCursor(KTextEditor::Document* doc, const KTextEditor::Cursor& cursor) override;
virtual void addWatch(KDevelop::Variable* variable) override;
virtual void addWatchpoint(KDevelop::Variable* variable) override;
virtual void update() override;
KTextEditor::Range expressionRangeUnderCursor(KTextEditor::Document* doc, const KTextEditor::Cursor& cursor) override;
void addWatch(KDevelop::Variable* variable) override;
void addWatchpoint(KDevelop::Variable* variable) override;
void update() override;
private slots:
void programStopped(const GDBMI::AsyncRecord &r);
......
......@@ -41,11 +41,11 @@ class ManPageDocumentation : public KDevelop::IDocumentation
Q_OBJECT
public:
ManPageDocumentation(const QString& name, const QUrl& url);
virtual QString name() const override { return m_name; }
virtual QString description() const override;
QString name() const override { return m_name; }
QString description() const override;
virtual bool providesWidget() const;
virtual QWidget* documentationWidget(KDevelop::DocumentationFindWidget* findWidget, QWidget* parent = 0) override;
virtual KDevelop::IDocumentationProvider* provider() const override;
QWidget* documentationWidget(KDevelop::DocumentationFindWidget* findWidget, QWidget* parent = 0) override;
KDevelop::IDocumentationProvider* provider() const override;
static ManPagePlugin* s_provider;
private slots:
......@@ -62,10 +62,10 @@ class ManPageHomeDocumentation : public KDevelop::IDocumentation
{
Q_OBJECT
public:
virtual KDevelop::IDocumentationProvider* provider() const override;
virtual QString name() const override;
virtual QString description() const override { return name(); }
virtual QWidget* documentationWidget ( KDevelop::DocumentationFindWidget* findWidget, QWidget* parent = 0 ) override;
KDevelop::IDocumentationProvider* provider() const override;
QString name() const override;
QString description() const override { return name(); }
QWidget* documentationWidget ( KDevelop::DocumentationFindWidget* findWidget, QWidget* parent = 0 ) override;
};
......
......@@ -38,17 +38,17 @@ class ManPageModel : public QAbstractItemModel
public:
ManPageModel(QObject* parent = 0);
virtual ~ManPageModel();
~ManPageModel() override;
/**
* You can use @p DeclarationRole to get the Declaration for a given index.
* NOTE: If you use that, don't forget to lock the DUChain if you access the declaration!
*/
virtual QVariant data(const QModelIndex& index, int role = Qt::DisplayRole) const override;
virtual int rowCount(const QModelIndex& parent = QModelIndex()) const override;
virtual int columnCount(const QModelIndex& = QModelIndex()) const override { return 1; }
virtual QModelIndex parent(const QModelIndex& child = QModelIndex()) const override;
virtual QModelIndex index(int row, int column, const QModelIndex& parent = QModelIndex()) const override;
QVariant data(const QModelIndex& index, int role = Qt::DisplayRole) const override;
int rowCount(const QModelIndex& parent = QModelIndex()) const override;
int columnCount(const QModelIndex& = QModelIndex()) const override { return 1; }
QModelIndex parent(const QModelIndex& child = QModelIndex()) const override;
QModelIndex index(int row, int column, const QModelIndex& parent = QModelIndex()) const override;
QStringListModel* indexList();
bool containsIdentifier(QString identifier);
......
......@@ -37,13 +37,13 @@ class ManPagePlugin : public KDevelop::IPlugin, public KDevelop::IDocumentationP
Q_INTERFACES( KDevelop::IDocumentationProvider )
public:
ManPagePlugin(QObject *parent, const QVariantList & args= QVariantList());
virtual ~ManPagePlugin();
virtual KDevelop::IDocumentation::Ptr documentationForDeclaration (KDevelop::Declaration* dec) const override;
virtual QAbstractListModel* indexModel() const override;
virtual KDevelop::IDocumentation::Ptr documentationForIndex(const QModelIndex& index) const override;
virtual QIcon icon() const override;
virtual QString name() const override;
virtual KDevelop::IDocumentation::Ptr homePage() const override;
~ManPagePlugin() override;
KDevelop::IDocumentation::Ptr documentationForDeclaration (KDevelop::Declaration* dec) const override;
QAbstractListModel* indexModel() const override;
KDevelop::IDocumentation::Ptr documentationForIndex(const QModelIndex& index) const override;
QIcon icon() const override;
QString name() const override;
KDevelop::IDocumentation::Ptr homePage() const override;
void deleteProgressBar();
ManPageModel* model() const;
......
......@@ -63,7 +63,7 @@ public:
bool checkQtHelpFile();
virtual void accept() override;
void accept() override;
private:
QTreeWidgetItem* m_modifiedItem;
......
......@@ -41,12 +41,12 @@ public:
public:
explicit QtHelpConfig(QtHelpPlugin* plugin, QWidget *parent = 0);
virtual ~QtHelpConfig();
~QtHelpConfig() override;
bool checkNamespace(const QString &filename, QTreeWidgetItem* modifiedItem);
virtual QString name() const override;
virtual QIcon icon() const override;
QString name() const override;
QIcon icon() const override;
private slots:
void add();
......@@ -60,9 +60,9 @@ public:
void searchDirChanged();
public Q_SLOTS:
virtual void apply() override;
virtual void defaults() override;