Use override

parent 69eca13b
...@@ -28,19 +28,19 @@ class KonqAboutPage : public KHTMLPart ...@@ -28,19 +28,19 @@ class KonqAboutPage : public KHTMLPart
Q_OBJECT Q_OBJECT
public: public:
KonqAboutPage(QWidget *parentWidget, QObject *parent, const QVariantList &args); KonqAboutPage(QWidget *parentWidget, QObject *parent, const QVariantList &args);
~KonqAboutPage(); ~KonqAboutPage() override;
bool openUrl(const QUrl &url) Q_DECL_OVERRIDE; bool openUrl(const QUrl &url) override;
bool openFile() Q_DECL_OVERRIDE; bool openFile() override;
void saveState(QDataStream &stream) Q_DECL_OVERRIDE; void saveState(QDataStream &stream) override;
void restoreState(QDataStream &stream) Q_DECL_OVERRIDE; void restoreState(QDataStream &stream) override;
protected: protected:
bool urlSelected(const QString &url, int button, int state, const QString &target, bool urlSelected(const QString &url, int button, int state, const QString &target,
const KParts::OpenUrlArguments &args = KParts::OpenUrlArguments(), const KParts::OpenUrlArguments &args = KParts::OpenUrlArguments(),
const KParts::BrowserArguments &browserArgs = KParts::BrowserArguments()) Q_DECL_OVERRIDE; const KParts::BrowserArguments &browserArgs = KParts::BrowserArguments()) override;
private: private:
void serve(const QString &, const QString &); void serve(const QString &, const QString &);
......
...@@ -134,37 +134,37 @@ public: ...@@ -134,37 +134,37 @@ public:
{ {
return m_output; return m_output;
} }
bool visit(KonqFrame *) Q_DECL_OVERRIDE bool visit(KonqFrame *) override
{ {
m_output += 'F'; m_output += 'F';
return true; return true;
} }
bool visit(KonqFrameContainer *) Q_DECL_OVERRIDE bool visit(KonqFrameContainer *) override
{ {
m_output += QLatin1String("C("); m_output += QLatin1String("C(");
return true; return true;
} }
bool visit(KonqFrameTabs *) Q_DECL_OVERRIDE bool visit(KonqFrameTabs *) override
{ {
m_output += QLatin1String("T["); m_output += QLatin1String("T[");
return true; return true;
} }
bool visit(KonqMainWindow *) Q_DECL_OVERRIDE bool visit(KonqMainWindow *) override
{ {
m_output += 'M'; m_output += 'M';
return true; return true;
} }
bool endVisit(KonqFrameContainer *) Q_DECL_OVERRIDE bool endVisit(KonqFrameContainer *) override
{ {
m_output += ')'; m_output += ')';
return true; return true;
} }
bool endVisit(KonqFrameTabs *) Q_DECL_OVERRIDE bool endVisit(KonqFrameTabs *) override
{ {
m_output += ']'; m_output += ']';
return true; return true;
} }
bool endVisit(KonqMainWindow *) Q_DECL_OVERRIDE bool endVisit(KonqMainWindow *) override
{ {
m_output += '.'; m_output += '.';
return true; return true;
......
...@@ -37,7 +37,7 @@ class LIBKONQ_EXPORT KonqFileSelectionEvent : public KParts::Event ...@@ -37,7 +37,7 @@ class LIBKONQ_EXPORT KonqFileSelectionEvent : public KParts::Event
{ {
public: public:
KonqFileSelectionEvent(const KFileItemList &selection, KParts::ReadOnlyPart *part); KonqFileSelectionEvent(const KFileItemList &selection, KParts::ReadOnlyPart *part);
~KonqFileSelectionEvent(); ~KonqFileSelectionEvent() override;
KFileItemList selection() const KFileItemList selection() const
{ {
...@@ -65,7 +65,7 @@ class LIBKONQ_EXPORT KonqFileMouseOverEvent : public KParts::Event ...@@ -65,7 +65,7 @@ class LIBKONQ_EXPORT KonqFileMouseOverEvent : public KParts::Event
{ {
public: public:
KonqFileMouseOverEvent(const KFileItem &item, KParts::ReadOnlyPart *part); KonqFileMouseOverEvent(const KFileItem &item, KParts::ReadOnlyPart *part);
~KonqFileMouseOverEvent(); ~KonqFileMouseOverEvent() override;
const KFileItem &item() const const KFileItem &item() const
{ {
......
...@@ -38,7 +38,7 @@ class KonqHistoryLoader : public QObject ...@@ -38,7 +38,7 @@ class KonqHistoryLoader : public QObject
public: public:
explicit KonqHistoryLoader(QObject *parent = nullptr); explicit KonqHistoryLoader(QObject *parent = nullptr);
virtual ~KonqHistoryLoader(); ~KonqHistoryLoader() override;
/** /**
* Load the history. No need to call this more than once... * Load the history. No need to call this more than once...
......
...@@ -54,7 +54,7 @@ public: ...@@ -54,7 +54,7 @@ public:
} }
explicit KonqHistoryProvider(QObject *parent = nullptr); explicit KonqHistoryProvider(QObject *parent = nullptr);
virtual ~KonqHistoryProvider(); ~KonqHistoryProvider() override;
/** /**
* @returns the list of all history entries, sorted by date * @returns the list of all history entries, sorted by date
......
...@@ -106,7 +106,7 @@ public: ...@@ -106,7 +106,7 @@ public:
/** /**
* Don't forget to destroy the object * Don't forget to destroy the object
*/ */
~KonqPopupMenu(); ~KonqPopupMenu() override;
/** /**
* Sets the "New file" menu instance. This allows to share it with the menubar. * Sets the "New file" menu instance. This allows to share it with the menubar.
......
...@@ -33,7 +33,7 @@ class AkregatorMenu : public KAbstractFileItemActionPlugin ...@@ -33,7 +33,7 @@ class AkregatorMenu : public KAbstractFileItemActionPlugin
public: public:
AkregatorMenu(QObject *parent, const QVariantList &args); AkregatorMenu(QObject *parent, const QVariantList &args);
virtual ~AkregatorMenu() = default; ~AkregatorMenu() override = default;
QList<QAction *> actions(const KFileItemListProperties &fileItemInfos, QWidget *parent) override; QList<QAction *> actions(const KFileItemListProperties &fileItemInfos, QWidget *parent) override;
......
...@@ -49,7 +49,7 @@ class KonqFeedIcon : public KParts::Plugin ...@@ -49,7 +49,7 @@ class KonqFeedIcon : public KParts::Plugin
public: public:
KonqFeedIcon(QObject *parent, const QVariantList &args); KonqFeedIcon(QObject *parent, const QVariantList &args);
virtual ~KonqFeedIcon(); ~KonqFeedIcon() override;
private: private:
/** /**
......
...@@ -55,7 +55,7 @@ public: ...@@ -55,7 +55,7 @@ public:
/** /**
* Destructor. * Destructor.
*/ */
virtual ~AutoRefresh(); ~AutoRefresh() override;
public slots: public slots:
void slotRefresh(); void slotRefresh();
......
...@@ -29,7 +29,7 @@ class PluginBabelFish : public KParts::Plugin ...@@ -29,7 +29,7 @@ class PluginBabelFish : public KParts::Plugin
public: public:
explicit PluginBabelFish(QObject *parent, explicit PluginBabelFish(QObject *parent,
const QVariantList &); const QVariantList &);
virtual ~PluginBabelFish(); ~PluginBabelFish() override;
private slots: private slots:
void translateURL(QAction *); void translateURL(QAction *);
......
...@@ -43,7 +43,7 @@ class FilterBar : public QWidget ...@@ -43,7 +43,7 @@ class FilterBar : public QWidget
public: public:
explicit FilterBar(QWidget *parent = nullptr); explicit FilterBar(QWidget *parent = nullptr);
virtual ~FilterBar(); ~FilterBar() override;
void selectAll(); void selectAll();
QMenu *typeFilterMenu(); QMenu *typeFilterMenu();
...@@ -62,8 +62,8 @@ Q_SIGNALS: ...@@ -62,8 +62,8 @@ Q_SIGNALS:
void closeRequest(); void closeRequest();
protected: protected:
void showEvent(QShowEvent *event) Q_DECL_OVERRIDE; void showEvent(QShowEvent *event) override;
void keyReleaseEvent(QKeyEvent *event) Q_DECL_OVERRIDE; void keyReleaseEvent(QKeyEvent *event) override;
private: private:
KLineEdit *m_filterInput; KLineEdit *m_filterInput;
...@@ -102,7 +102,7 @@ class DirFilterPlugin : public KParts::Plugin ...@@ -102,7 +102,7 @@ class DirFilterPlugin : public KParts::Plugin
public: public:
DirFilterPlugin(QObject *parent, const QVariantList &); DirFilterPlugin(QObject *parent, const QVariantList &);
~DirFilterPlugin(); ~DirFilterPlugin() override;
private Q_SLOTS: private Q_SLOTS:
void slotReset(); void slotReset();
......
...@@ -34,7 +34,7 @@ public: ...@@ -34,7 +34,7 @@ public:
DOMListViewItem(const DOM::Node &, QTreeWidgetItem *parent); DOMListViewItem(const DOM::Node &, QTreeWidgetItem *parent);
DOMListViewItem(const DOM::Node &, QTreeWidgetItem *parent, DOMListViewItem(const DOM::Node &, QTreeWidgetItem *parent,
QTreeWidgetItem *preceding); QTreeWidgetItem *preceding);
virtual ~DOMListViewItem(); ~DOMListViewItem() override;
void setColor(const QColor &color) void setColor(const QColor &color)
{ {
......
...@@ -49,7 +49,7 @@ class ManipulationCommandSignalEmitter : public QObject ...@@ -49,7 +49,7 @@ class ManipulationCommandSignalEmitter : public QObject
Q_OBJECT Q_OBJECT
public: public:
ManipulationCommandSignalEmitter(); ManipulationCommandSignalEmitter();
virtual ~ManipulationCommandSignalEmitter(); ~ManipulationCommandSignalEmitter() override;
// public signals: // public signals:
signals: signals:
...@@ -75,7 +75,7 @@ class ManipulationCommand : public QUndoCommand ...@@ -75,7 +75,7 @@ class ManipulationCommand : public QUndoCommand
{ {
public: public:
ManipulationCommand(); ManipulationCommand();
virtual ~ManipulationCommand(); ~ManipulationCommand() override;
/** returns whether this command is still valid and can be executed */ /** returns whether this command is still valid and can be executed */
bool isValid() const bool isValid() const
...@@ -102,9 +102,9 @@ public: ...@@ -102,9 +102,9 @@ public:
static void connect(const char *signal, QObject *recv, const char *slot); static void connect(const char *signal, QObject *recv, const char *slot);
/** does grunt work and calls apply()/reapply() */ /** does grunt work and calls apply()/reapply() */
void redo() Q_DECL_OVERRIDE; void redo() override;
/** does grunt work and calls unapply() */ /** does grunt work and calls unapply() */
void undo() Q_DECL_OVERRIDE; void undo() override;
protected: protected:
virtual void apply() = 0; virtual void apply() = 0;
...@@ -139,7 +139,7 @@ class MultiCommand : public ManipulationCommand ...@@ -139,7 +139,7 @@ class MultiCommand : public ManipulationCommand
{ {
public: public:
MultiCommand(const QString &name); MultiCommand(const QString &name);
virtual ~MultiCommand(); ~MultiCommand() override;
/** Adds a new command. Will take ownership of \c cmd */ /** Adds a new command. Will take ownership of \c cmd */
void addCommand(ManipulationCommand *cmd); void addCommand(ManipulationCommand *cmd);
...@@ -147,8 +147,8 @@ public: ...@@ -147,8 +147,8 @@ public:
virtual QString name() const; virtual QString name() const;
protected: protected:
void apply() Q_DECL_OVERRIDE; void apply() override;
void unapply() Q_DECL_OVERRIDE; void unapply() override;
void mergeChangedNodesFrom(ManipulationCommand *cmd); void mergeChangedNodesFrom(ManipulationCommand *cmd);
...@@ -165,13 +165,13 @@ class AddAttributeCommand : public ManipulationCommand ...@@ -165,13 +165,13 @@ class AddAttributeCommand : public ManipulationCommand
{ {
public: public:
AddAttributeCommand(const DOM::Element &element, const QString &attrName, const QString &attrValue); AddAttributeCommand(const DOM::Element &element, const QString &attrName, const QString &attrValue);
virtual ~AddAttributeCommand(); ~AddAttributeCommand() override;
virtual QString name() const; virtual QString name() const;
protected: protected:
void apply() Q_DECL_OVERRIDE; void apply() override;
void unapply() Q_DECL_OVERRIDE; void unapply() override;
protected: protected:
DOM::Element _element; DOM::Element _element;
...@@ -187,13 +187,13 @@ class ChangeAttributeValueCommand : public ManipulationCommand ...@@ -187,13 +187,13 @@ class ChangeAttributeValueCommand : public ManipulationCommand
{ {
public: public:
ChangeAttributeValueCommand(const DOM::Element &element, const QString &attr, const QString &value); ChangeAttributeValueCommand(const DOM::Element &element, const QString &attr, const QString &value);
virtual ~ChangeAttributeValueCommand(); ~ChangeAttributeValueCommand() override;
virtual QString name() const; virtual QString name() const;
protected: protected:
void apply() Q_DECL_OVERRIDE; void apply() override;
void unapply() Q_DECL_OVERRIDE; void unapply() override;
protected: protected:
DOM::Element _element; DOM::Element _element;
...@@ -210,13 +210,13 @@ class RemoveAttributeCommand : public ManipulationCommand ...@@ -210,13 +210,13 @@ class RemoveAttributeCommand : public ManipulationCommand
{ {
public: public:
RemoveAttributeCommand(const DOM::Element &element, const QString &attrName); RemoveAttributeCommand(const DOM::Element &element, const QString &attrName);
virtual ~RemoveAttributeCommand(); ~RemoveAttributeCommand() override;
virtual QString name() const; virtual QString name() const;
protected: protected:
void apply() Q_DECL_OVERRIDE; void apply() override;
void unapply() Q_DECL_OVERRIDE; void unapply() override;
protected: protected:
DOM::Element _element; DOM::Element _element;
...@@ -232,13 +232,13 @@ class RenameAttributeCommand : public ManipulationCommand ...@@ -232,13 +232,13 @@ class RenameAttributeCommand : public ManipulationCommand
{ {
public: public:
RenameAttributeCommand(const DOM::Element &element, const QString &attrOldName, const QString &attrNewName); RenameAttributeCommand(const DOM::Element &element, const QString &attrOldName, const QString &attrNewName);
virtual ~RenameAttributeCommand(); ~RenameAttributeCommand() override;
virtual QString name() const; virtual QString name() const;
protected: protected:
void apply() Q_DECL_OVERRIDE; void apply() override;
void unapply() Q_DECL_OVERRIDE; void unapply() override;
protected: protected:
DOM::Element _element; DOM::Element _element;
...@@ -255,13 +255,13 @@ class ChangeCDataCommand : public ManipulationCommand ...@@ -255,13 +255,13 @@ class ChangeCDataCommand : public ManipulationCommand
{ {
public: public:
ChangeCDataCommand(const DOM::CharacterData &, const QString &value); ChangeCDataCommand(const DOM::CharacterData &, const QString &value);
virtual ~ChangeCDataCommand(); ~ChangeCDataCommand() override;
virtual QString name() const; virtual QString name() const;
protected: protected:
void apply() Q_DECL_OVERRIDE; void apply() override;
void unapply() Q_DECL_OVERRIDE; void unapply() override;
protected: protected:
DOM::CharacterData cdata; DOM::CharacterData cdata;
...@@ -282,7 +282,7 @@ public: ...@@ -282,7 +282,7 @@ public:
* before \c after. If \c after is 0, it is appended at the end. * before \c after. If \c after is 0, it is appended at the end.
*/ */
ManipulateNodeCommand(const DOM::Node &node, const DOM::Node &parent, const DOM::Node &after); ManipulateNodeCommand(const DOM::Node &node, const DOM::Node &parent, const DOM::Node &after);
virtual ~ManipulateNodeCommand(); ~ManipulateNodeCommand() override;
protected: protected:
void insert(); void insert();
...@@ -309,13 +309,13 @@ public: ...@@ -309,13 +309,13 @@ public:
* before \c after. If \c after is 0, append it to the list of children. * before \c after. If \c after is 0, append it to the list of children.
*/ */
InsertNodeCommand(const DOM::Node &node, const DOM::Node &parent, const DOM::Node &after); InsertNodeCommand(const DOM::Node &node, const DOM::Node &parent, const DOM::Node &after);
virtual ~InsertNodeCommand(); ~InsertNodeCommand() override;
virtual QString name() const; virtual QString name() const;
protected: protected:
void apply() Q_DECL_OVERRIDE; void apply() override;
void unapply() Q_DECL_OVERRIDE; void unapply() override;
protected: protected:
}; };
...@@ -335,13 +335,13 @@ public: ...@@ -335,13 +335,13 @@ public:
* before \c after. If \c after is 0, append it to the list of children. * before \c after. If \c after is 0, append it to the list of children.
*/ */
RemoveNodeCommand(const DOM::Node &node, const DOM::Node &parent, const DOM::Node &after); RemoveNodeCommand(const DOM::Node &node, const DOM::Node &parent, const DOM::Node &after);
virtual ~RemoveNodeCommand(); ~RemoveNodeCommand() override;
virtual QString name() const; virtual QString name() const;
protected: protected:
void apply() Q_DECL_OVERRIDE; void apply() override;
void unapply() Q_DECL_OVERRIDE; void unapply() override;
protected: protected:
}; };
...@@ -358,13 +358,13 @@ public: ...@@ -358,13 +358,13 @@ public:
* Appends if \c after is 0. * Appends if \c after is 0.
*/ */
MoveNodeCommand(const DOM::Node &node, const DOM::Node &parent, const DOM::Node &after); MoveNodeCommand(const DOM::Node &node, const DOM::Node &parent, const DOM::Node &after);
virtual ~MoveNodeCommand(); ~MoveNodeCommand() override;
virtual QString name() const; virtual QString name() const;
protected: protected:
void apply() Q_DECL_OVERRIDE; void apply() override;
void unapply() Q_DECL_OVERRIDE; void unapply() override;
protected: protected:
DOM::Node _node; DOM::Node _node;
......
...@@ -1097,7 +1097,7 @@ public: ...@@ -1097,7 +1097,7 @@ public:
_new = s; _new = s;
} }
bool operator<(const QTreeWidgetItem &other) const Q_DECL_OVERRIDE bool operator<(const QTreeWidgetItem &other) const override
{ {
// Keep the "Add" item at the end // Keep the "Add" item at the end
if (_new) { if (_new) {
......
...@@ -44,7 +44,7 @@ class DOMTreeView : public QWidget, public Ui::DOMTreeViewBase ...@@ -44,7 +44,7 @@ class DOMTreeView : public QWidget, public Ui::DOMTreeViewBase
public: public:
explicit DOMTreeView(QWidget *parent, bool allowSaving = true); explicit DOMTreeView(QWidget *parent, bool allowSaving = true);
~DOMTreeView(); ~DOMTreeView() override;
KHTMLPart *htmlPart() const KHTMLPart *htmlPart() const
{ {
...@@ -59,7 +59,7 @@ protected: ...@@ -59,7 +59,7 @@ protected: