Use override

parent 69eca13b
......@@ -28,19 +28,19 @@ class KonqAboutPage : public KHTMLPart
Q_OBJECT
public:
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 restoreState(QDataStream &stream) Q_DECL_OVERRIDE;
void saveState(QDataStream &stream) override;
void restoreState(QDataStream &stream) override;
protected:
bool urlSelected(const QString &url, int button, int state, const QString &target,
const KParts::OpenUrlArguments &args = KParts::OpenUrlArguments(),
const KParts::BrowserArguments &browserArgs = KParts::BrowserArguments()) Q_DECL_OVERRIDE;
const KParts::BrowserArguments &browserArgs = KParts::BrowserArguments()) override;
private:
void serve(const QString &, const QString &);
......
......@@ -134,37 +134,37 @@ public:
{
return m_output;
}
bool visit(KonqFrame *) Q_DECL_OVERRIDE
bool visit(KonqFrame *) override
{
m_output += 'F';
return true;
}
bool visit(KonqFrameContainer *) Q_DECL_OVERRIDE
bool visit(KonqFrameContainer *) override
{
m_output += QLatin1String("C(");
return true;
}
bool visit(KonqFrameTabs *) Q_DECL_OVERRIDE
bool visit(KonqFrameTabs *) override
{
m_output += QLatin1String("T[");
return true;
}
bool visit(KonqMainWindow *) Q_DECL_OVERRIDE
bool visit(KonqMainWindow *) override
{
m_output += 'M';
return true;
}
bool endVisit(KonqFrameContainer *) Q_DECL_OVERRIDE
bool endVisit(KonqFrameContainer *) override
{
m_output += ')';
return true;
}
bool endVisit(KonqFrameTabs *) Q_DECL_OVERRIDE
bool endVisit(KonqFrameTabs *) override
{
m_output += ']';
return true;
}
bool endVisit(KonqMainWindow *) Q_DECL_OVERRIDE
bool endVisit(KonqMainWindow *) override
{
m_output += '.';
return true;
......
......@@ -37,7 +37,7 @@ class LIBKONQ_EXPORT KonqFileSelectionEvent : public KParts::Event
{
public:
KonqFileSelectionEvent(const KFileItemList &selection, KParts::ReadOnlyPart *part);
~KonqFileSelectionEvent();
~KonqFileSelectionEvent() override;
KFileItemList selection() const
{
......@@ -65,7 +65,7 @@ class LIBKONQ_EXPORT KonqFileMouseOverEvent : public KParts::Event
{
public:
KonqFileMouseOverEvent(const KFileItem &item, KParts::ReadOnlyPart *part);
~KonqFileMouseOverEvent();
~KonqFileMouseOverEvent() override;
const KFileItem &item() const
{
......
......@@ -38,7 +38,7 @@ class KonqHistoryLoader : public QObject
public:
explicit KonqHistoryLoader(QObject *parent = nullptr);
virtual ~KonqHistoryLoader();
~KonqHistoryLoader() override;
/**
* Load the history. No need to call this more than once...
......
......@@ -54,7 +54,7 @@ public:
}
explicit KonqHistoryProvider(QObject *parent = nullptr);
virtual ~KonqHistoryProvider();
~KonqHistoryProvider() override;
/**
* @returns the list of all history entries, sorted by date
......
......@@ -106,7 +106,7 @@ public:
/**
* Don't forget to destroy the object
*/
~KonqPopupMenu();
~KonqPopupMenu() override;
/**
* Sets the "New file" menu instance. This allows to share it with the menubar.
......
......@@ -33,7 +33,7 @@ class AkregatorMenu : public KAbstractFileItemActionPlugin
public:
AkregatorMenu(QObject *parent, const QVariantList &args);
virtual ~AkregatorMenu() = default;
~AkregatorMenu() override = default;
QList<QAction *> actions(const KFileItemListProperties &fileItemInfos, QWidget *parent) override;
......
......@@ -49,7 +49,7 @@ class KonqFeedIcon : public KParts::Plugin
public:
KonqFeedIcon(QObject *parent, const QVariantList &args);
virtual ~KonqFeedIcon();
~KonqFeedIcon() override;
private:
/**
......
......@@ -55,7 +55,7 @@ public:
/**
* Destructor.
*/
virtual ~AutoRefresh();
~AutoRefresh() override;
public slots:
void slotRefresh();
......
......@@ -29,7 +29,7 @@ class PluginBabelFish : public KParts::Plugin
public:
explicit PluginBabelFish(QObject *parent,
const QVariantList &);
virtual ~PluginBabelFish();
~PluginBabelFish() override;
private slots:
void translateURL(QAction *);
......
......@@ -43,7 +43,7 @@ class FilterBar : public QWidget
public:
explicit FilterBar(QWidget *parent = nullptr);
virtual ~FilterBar();
~FilterBar() override;
void selectAll();
QMenu *typeFilterMenu();
......@@ -62,8 +62,8 @@ Q_SIGNALS:
void closeRequest();
protected:
void showEvent(QShowEvent *event) Q_DECL_OVERRIDE;
void keyReleaseEvent(QKeyEvent *event) Q_DECL_OVERRIDE;
void showEvent(QShowEvent *event) override;
void keyReleaseEvent(QKeyEvent *event) override;
private:
KLineEdit *m_filterInput;
......@@ -102,7 +102,7 @@ class DirFilterPlugin : public KParts::Plugin
public:
DirFilterPlugin(QObject *parent, const QVariantList &);
~DirFilterPlugin();
~DirFilterPlugin() override;
private Q_SLOTS:
void slotReset();
......
......@@ -34,7 +34,7 @@ public:
DOMListViewItem(const DOM::Node &, QTreeWidgetItem *parent);
DOMListViewItem(const DOM::Node &, QTreeWidgetItem *parent,
QTreeWidgetItem *preceding);
virtual ~DOMListViewItem();
~DOMListViewItem() override;
void setColor(const QColor &color)
{
......
......@@ -49,7 +49,7 @@ class ManipulationCommandSignalEmitter : public QObject
Q_OBJECT
public:
ManipulationCommandSignalEmitter();
virtual ~ManipulationCommandSignalEmitter();
~ManipulationCommandSignalEmitter() override;
// public signals:
signals:
......@@ -75,7 +75,7 @@ class ManipulationCommand : public QUndoCommand
{
public:
ManipulationCommand();
virtual ~ManipulationCommand();
~ManipulationCommand() override;
/** returns whether this command is still valid and can be executed */
bool isValid() const
......@@ -102,9 +102,9 @@ public:
static void connect(const char *signal, QObject *recv, const char *slot);
/** does grunt work and calls apply()/reapply() */
void redo() Q_DECL_OVERRIDE;
void redo() override;
/** does grunt work and calls unapply() */
void undo() Q_DECL_OVERRIDE;
void undo() override;
protected:
virtual void apply() = 0;
......@@ -139,7 +139,7 @@ class MultiCommand : public ManipulationCommand
{
public:
MultiCommand(const QString &name);
virtual ~MultiCommand();
~MultiCommand() override;
/** Adds a new command. Will take ownership of \c cmd */
void addCommand(ManipulationCommand *cmd);
......@@ -147,8 +147,8 @@ public:
virtual QString name() const;
protected:
void apply() Q_DECL_OVERRIDE;
void unapply() Q_DECL_OVERRIDE;
void apply() override;
void unapply() override;
void mergeChangedNodesFrom(ManipulationCommand *cmd);
......@@ -165,13 +165,13 @@ class AddAttributeCommand : public ManipulationCommand
{
public:
AddAttributeCommand(const DOM::Element &element, const QString &attrName, const QString &attrValue);
virtual ~AddAttributeCommand();
~AddAttributeCommand() override;
virtual QString name() const;
protected:
void apply() Q_DECL_OVERRIDE;
void unapply() Q_DECL_OVERRIDE;
void apply() override;
void unapply() override;
protected:
DOM::Element _element;
......@@ -187,13 +187,13 @@ class ChangeAttributeValueCommand : public ManipulationCommand
{
public:
ChangeAttributeValueCommand(const DOM::Element &element, const QString &attr, const QString &value);
virtual ~ChangeAttributeValueCommand();
~ChangeAttributeValueCommand() override;
virtual QString name() const;
protected:
void apply() Q_DECL_OVERRIDE;
void unapply() Q_DECL_OVERRIDE;
void apply() override;
void unapply() override;
protected:
DOM::Element _element;
......@@ -210,13 +210,13 @@ class RemoveAttributeCommand : public ManipulationCommand
{
public:
RemoveAttributeCommand(const DOM::Element &element, const QString &attrName);
virtual ~RemoveAttributeCommand();
~RemoveAttributeCommand() override;
virtual QString name() const;
protected:
void apply() Q_DECL_OVERRIDE;
void unapply() Q_DECL_OVERRIDE;
void apply() override;
void unapply() override;
protected:
DOM::Element _element;
......@@ -232,13 +232,13 @@ class RenameAttributeCommand : public ManipulationCommand
{
public:
RenameAttributeCommand(const DOM::Element &element, const QString &attrOldName, const QString &attrNewName);
virtual ~RenameAttributeCommand();
~RenameAttributeCommand() override;
virtual QString name() const;
protected:
void apply() Q_DECL_OVERRIDE;
void unapply() Q_DECL_OVERRIDE;
void apply() override;
void unapply() override;
protected:
DOM::Element _element;
......@@ -255,13 +255,13 @@ class ChangeCDataCommand : public ManipulationCommand
{
public:
ChangeCDataCommand(const DOM::CharacterData &, const QString &value);
virtual ~ChangeCDataCommand();
~ChangeCDataCommand() override;
virtual QString name() const;
protected:
void apply() Q_DECL_OVERRIDE;
void unapply() Q_DECL_OVERRIDE;
void apply() override;
void unapply() override;
protected:
DOM::CharacterData cdata;
......@@ -282,7 +282,7 @@ public:
* 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);
virtual ~ManipulateNodeCommand();
~ManipulateNodeCommand() override;
protected:
void insert();
......@@ -309,13 +309,13 @@ public:
* 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);
virtual ~InsertNodeCommand();
~InsertNodeCommand() override;
virtual QString name() const;
protected:
void apply() Q_DECL_OVERRIDE;
void unapply() Q_DECL_OVERRIDE;
void apply() override;
void unapply() override;
protected:
};
......@@ -335,13 +335,13 @@ public:
* 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);
virtual ~RemoveNodeCommand();
~RemoveNodeCommand() override;
virtual QString name() const;
protected:
void apply() Q_DECL_OVERRIDE;
void unapply() Q_DECL_OVERRIDE;
void apply() override;
void unapply() override;
protected:
};
......@@ -358,13 +358,13 @@ public:
* Appends if \c after is 0.
*/
MoveNodeCommand(const DOM::Node &node, const DOM::Node &parent, const DOM::Node &after);
virtual ~MoveNodeCommand();
~MoveNodeCommand() override;
virtual QString name() const;
protected:
void apply() Q_DECL_OVERRIDE;
void unapply() Q_DECL_OVERRIDE;
void apply() override;
void unapply() override;
protected:
DOM::Node _node;
......
......@@ -1097,7 +1097,7 @@ public:
_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
if (_new) {
......
......@@ -44,7 +44,7 @@ class DOMTreeView : public QWidget, public Ui::DOMTreeViewBase
public:
explicit DOMTreeView(QWidget *parent, bool allowSaving = true);
~DOMTreeView();
~DOMTreeView() override;
KHTMLPart *htmlPart() const
{
......@@ -59,7 +59,7 @@ protected:
/*
void saveTreeAsHTML(const DOM::Node &pNode);
*/
bool eventFilter(QObject *o, QEvent *e) Q_DECL_OVERRIDE;
bool eventFilter(QObject *o, QEvent *e) override;
signals:
/** emitted when the part has been changed. */
......
......@@ -66,7 +66,7 @@ public:
/**
* Default Destructor
*/
virtual ~DOMTreeWindow();
~DOMTreeWindow() override;
/**
* returns the dom tree view
......@@ -153,21 +153,21 @@ protected:
/**
* Overridden virtuals for Qt drag 'n drop (XDND)
*/
void dragEnterEvent(QDragEnterEvent *event) Q_DECL_OVERRIDE;
void dropEvent(QDropEvent *event) Q_DECL_OVERRIDE;
void dragEnterEvent(QDragEnterEvent *event) override;
void dropEvent(QDropEvent *event) override;
protected:
/**
* This function is called when it is time for the app to save its
* properties for session management purposes.
*/
void saveProperties(KConfigGroup &) Q_DECL_OVERRIDE;
void saveProperties(KConfigGroup &) override;
/**
* This function is called when this app is restored. The KConfig
* object points to the session management config file that was saved
* with @ref saveProperties
*/
void readProperties(const KConfigGroup &) Q_DECL_OVERRIDE;
void readProperties(const KConfigGroup &) override;
private slots:
void slotCut();
......
......@@ -12,7 +12,7 @@ class PluginDomtreeviewer : public KParts::Plugin
public:
PluginDomtreeviewer(QObject *parent,
const QVariantList &);
virtual ~PluginDomtreeviewer();
~PluginDomtreeviewer() override;
public slots:
void slotShowDOMTree();
......
......@@ -48,7 +48,7 @@ class SignalReceiver : public QObject
public:
explicit SignalReceiver(QObject *parent = nullptr);
virtual ~SignalReceiver();
~SignalReceiver() override;
/** returns true if any signal has been received */
bool signalReceived() const
......
......@@ -72,7 +72,7 @@ public:
enum ColorMode { None = 0, Depth, Name, Owner, Group, Mime };
explicit FSView(Inode *, QWidget *parent = nullptr);
~FSView();
~FSView() override;
KConfig *config()
{
......@@ -102,7 +102,7 @@ public:
/* Implementation of listener interface of ScanManager.
* Used to calculate progress info */
void scanFinished(ScanDir *) Q_DECL_OVERRIDE;
void scanFinished(ScanDir *) override;
void stop();
......@@ -130,7 +130,7 @@ signals:
void completed(int dirs);
protected:
void keyPressEvent(QKeyEvent *) Q_DECL_OVERRIDE;
void keyPressEvent(QKeyEvent *) override;
private:
KConfig *_config;
......
......@@ -39,7 +39,7 @@ class FSViewBrowserExtension : public KParts::BrowserExtension
public:
explicit FSViewBrowserExtension(FSViewPart *viewPart);
~FSViewBrowserExtension();
~FSViewBrowserExtension() override;
protected slots:
void selected(TreeMapItem *);
......@@ -87,7 +87,7 @@ public:
FSViewPart(QWidget *parentWidget,
QObject *parent, const QList<QVariant> &args);
virtual ~FSViewPart();
~FSViewPart() override;
bool supportsUndo() const
{
......@@ -117,9 +117,9 @@ protected:
/**
* This must be implemented by each part
*/
bool openFile() Q_DECL_OVERRIDE;
bool openUrl(const QUrl &url) Q_DECL_OVERRIDE;
bool closeUrl() Q_DECL_OVERRIDE;
bool openFile() override;
bool openUrl(const QUrl &url) override;
bool closeUrl() override;
private:
FSView *_view;
......
......@@ -47,21 +47,21 @@ public:
Inode();
Inode(ScanDir *, Inode *);
Inode(ScanFile *, Inode *);
~Inode();
~Inode() override;
void init(const QString &);
void setPeer(ScanDir *);
TreeMapItemList *children() Q_DECL_OVERRIDE;
TreeMapItemList *children() override;
double value() const Q_DECL_OVERRIDE;
double value() const override;
double size() const;
unsigned int fileCount() const;
unsigned int dirCount() const;
QString path() const;
QString text(int i) const Q_DECL_OVERRIDE;
QPixmap pixmap(int i) const Q_DECL_OVERRIDE;
QColor backColor() const Q_DECL_OVERRIDE;
QString text(int i) const override;
QPixmap pixmap(int i) const override;
QColor backColor() const override;
QMimeType mimeType() const;
const QFileInfo &fileInfo() const
......@@ -81,10 +81,10 @@ public:
return (_dirPeer != nullptr);
}
void sizeChanged(ScanDir *) Q_DECL_OVERRIDE;
void scanFinished(ScanDir *) Q_DECL_OVERRIDE;
void destroyed(ScanDir *) Q_DECL_OVERRIDE;
void destroyed(ScanFile *) Q_DECL_OVERRIDE;
void sizeChanged(ScanDir *) override;
void scanFinished(ScanDir *) override;
void destroyed(ScanDir *) override;
void destroyed(ScanFile *) override;
private:
void setMetrics(double, unsigned int);
......
......@@ -25,12 +25,12 @@
class MyListener: public ScanListener
{
public:
void scanStarted(ScanDir *d) Q_DECL_OVERRIDE
void scanStarted(ScanDir *d) override
{
printf("Started Scan on %s\n", qPrintable(d->name()));
};
void sizeChanged(ScanDir *d) Q_DECL_OVERRIDE
void sizeChanged(ScanDir *d) override
{
printf("Change in %s: Dirs %d, Files %d",
qPrintable(d->name()),
......@@ -38,7 +38,7 @@ public:
printf("Size %llu\n", (unsigned long long int)d->size());
}
void scanFinished(ScanDir *d) Q_DECL_OVERRIDE
void scanFinished(ScanDir *d) override
{
printf("Finished Scan on %s\n", qPrintable(d->name()));
}
......
......@@ -124,41 +124,41 @@ public:
bool selected = false, bool current = false);
// getters
QString text(int) const Q_DECL_OVERRIDE;
QPixmap pixmap(int) const Q_DECL_OVERRIDE;
Position position(int) const Q_DECL_OVERRIDE;
int maxLines(int) const Q_DECL_OVERRIDE;
int fieldCount() const Q_DECL_OVERRIDE
QString text(int) const override;
QPixmap pixmap(int) const override;