Commit 60cce0f9 authored by David Faure's avatar David Faure

Add missing "override" keywords; scripted with clang-tidy

parent 4295aba5
......@@ -86,7 +86,7 @@ class Application : public QApplication
QStandardItemModel* getUrlModel() { return m_urlModel; }
Application(int &argc, char **argv);
~Application();
~Application() override;
static Application* instance();
......@@ -174,7 +174,7 @@ class Application : public QApplication
void closeWallet();
protected:
bool event(QEvent* event);
bool event(QEvent* event) override;
private:
void implementRestart();
......
......@@ -24,7 +24,7 @@ class AwayManager : public QObject
public:
explicit AwayManager(QObject* parent = 0);
~AwayManager();
~AwayManager() override;
public Q_SLOTS:
......
......@@ -34,16 +34,16 @@ class KonviBookmarkHandler : public QObject, public KBookmarkOwner
public:
explicit KonviBookmarkHandler(QMenu *menu, MainWindow* mainWindow);
~KonviBookmarkHandler();
~KonviBookmarkHandler() override;
// KBookmarkOwner interface:
virtual void openBookmark(const KBookmark &bm, Qt::MouseButtons mb, Qt::KeyboardModifiers km);
virtual QUrl currentUrl() const;
virtual QString currentTitle() const;
virtual bool enableOption(BookmarkOption option) const;
virtual bool supportsTabs() const;
virtual QList<KBookmarkOwner::FutureBookmark> currentBookmarkList() const;
virtual void openFolderinTabs(const KBookmarkGroup &group);
void openBookmark(const KBookmark &bm, Qt::MouseButtons mb, Qt::KeyboardModifiers km) override;
QUrl currentUrl() const override;
QString currentTitle() const override;
bool enableOption(BookmarkOption option) const override;
bool supportsTabs() const override;
QList<KBookmarkOwner::FutureBookmark> currentBookmarkList() const override;
void openFolderinTabs(const KBookmarkGroup &group) override;
private:
MainWindow* m_mainWindow;
......
......@@ -23,12 +23,12 @@ class Alias_Config : public QWidget, public KonviSettingsPage, private Ui::Alias
public:
explicit Alias_Config(QWidget* parent, const char* name = 0);
~Alias_Config();
~Alias_Config() override;
virtual void saveSettings();
virtual void loadSettings();
virtual void restorePageToDefaults();
virtual bool hasChanged();
void saveSettings() override;
void loadSettings() override;
void restorePageToDefaults() override;
bool hasChanged() override;
Q_SIGNALS:
void modified();
......
......@@ -23,13 +23,13 @@ class Autoreplace_Config : public QWidget, public KonviSettingsPage, private Ui:
public:
explicit Autoreplace_Config(QWidget* parent, const char* name=NULL);
~Autoreplace_Config();
~Autoreplace_Config() override;
virtual void saveSettings();
virtual void loadSettings();
virtual void restorePageToDefaults();
void saveSettings() override;
void loadSettings() override;
void restorePageToDefaults() override;
virtual bool hasChanged();
bool hasChanged() override;
Q_SIGNALS:
void modified();
......
......@@ -110,7 +110,7 @@ public:
* Deletes private class.
* @see exists()
*/
~ConfigDialog();
~ConfigDialog() override;
/**
* Adds page to the dialog and to KConfigDialogManager. When an
......@@ -275,12 +275,12 @@ protected:
/**
* @internal
*/
virtual void showEvent(QShowEvent *e);
void showEvent(QShowEvent *e) override;
/**
* @internal
*/
virtual void moveEvent(QMoveEvent *e);
void moveEvent(QMoveEvent *e) override;
private Q_SLOTS:
/**
......
......@@ -32,11 +32,11 @@ class ConnectionBehavior_Config : public QWidget, public KonviSettingsPage, priv
public:
explicit ConnectionBehavior_Config(QWidget* parent = NULL);
virtual void restorePageToDefaults();
virtual void saveSettings();
virtual void loadSettings();
void restorePageToDefaults() override;
void saveSettings() override;
void loadSettings() override;
virtual bool hasChanged();
bool hasChanged() override;
protected Q_SLOTS:
void setPasswordChanged(bool changed = true);
......
......@@ -22,7 +22,7 @@ class DCC_Config : public QWidget, private Ui::DCC_ConfigUI
public:
DCC_Config(QWidget* parent, const char* name);
~DCC_Config();
~DCC_Config() override;
protected Q_SLOTS:
virtual void languageChange();
......@@ -30,7 +30,7 @@ class DCC_Config : public QWidget, private Ui::DCC_ConfigUI
void dccUPnPChanged(int state);
protected:
virtual void showEvent(QShowEvent *event);
void showEvent(QShowEvent *event) override;
};
#endif
......@@ -25,14 +25,14 @@ class Highlight_Config : public QWidget, public KonviSettingsPage, private Ui::H
public:
explicit Highlight_Config(QWidget *parent = 0, const char *name = 0);
~Highlight_Config();
~Highlight_Config() override;
public:
virtual void saveSettings();
virtual void loadSettings();
virtual void restorePageToDefaults();
void saveSettings() override;
void loadSettings() override;
void restorePageToDefaults() override;
virtual bool hasChanged();
bool hasChanged() override;
Q_SIGNALS:
void modified();
......
......@@ -22,7 +22,7 @@ class HighlightTreeWidget : public QTreeWidget
HighlightTreeWidget(QWidget *parent = nullptr);
protected:
virtual void dropEvent(QDropEvent *event);
void dropEvent(QDropEvent *event) override;
signals:
void itemDropped();
......
......@@ -23,14 +23,14 @@ class Ignore_Config : public QWidget, public KonviSettingsPage, private Ui::Igno
public:
explicit Ignore_Config( QWidget* parent = 0, const char* name = 0, Qt::WindowFlags fl = 0 );
~Ignore_Config();
~Ignore_Config() override;
QString flagNames;
virtual void restorePageToDefaults();
virtual void saveSettings();
virtual void loadSettings();
void restorePageToDefaults() override;
void saveSettings() override;
void loadSettings() override;
virtual bool hasChanged();
bool hasChanged() override;
private:
QStringList m_oldIgnoreList;
......
......@@ -23,13 +23,13 @@ class NicklistBehavior_Config : public QWidget, public KonviSettingsPage, privat
public:
explicit NicklistBehavior_Config(QWidget *parent = 0, const char *name = 0);
~NicklistBehavior_Config();
~NicklistBehavior_Config() override;
virtual void saveSettings();
virtual void loadSettings();
virtual void restorePageToDefaults();
void saveSettings() override;
void loadSettings() override;
void restorePageToDefaults() override;
virtual bool hasChanged();
bool hasChanged() override;
private:
void setNickList(const QString &sortingOrder);
......
......@@ -28,13 +28,13 @@ class OSD_Config : public QWidget, public KonviSettingsPage, private Ui::OSD_Con
public:
explicit OSD_Config( QWidget* parent = 0, const char* name = 0, Qt::WindowFlags fl = 0 );
~OSD_Config();
~OSD_Config() override;
virtual void restorePageToDefaults();
virtual void saveSettings();
virtual void loadSettings();
void restorePageToDefaults() override;
void saveSettings() override;
void loadSettings() override;
virtual bool hasChanged(); // implement the interface, will not be used here, though
bool hasChanged() override; // implement the interface, will not be used here, though
protected Q_SLOTS:
void slotOSDEnabledChanged(bool on);
......@@ -47,8 +47,8 @@ class OSD_Config : public QWidget, public KonviSettingsPage, private Ui::OSD_Con
void slotPositionChanged();
protected:
void showEvent(QShowEvent* event);
void hideEvent(QHideEvent* event);
void showEvent(QShowEvent* event) override;
void hideEvent(QHideEvent* event) override;
private:
OSDPreviewWidget* m_pOSDPreview;
......
......@@ -47,7 +47,7 @@ class Preferences : public PreferencesBase
public:
static Preferences *self();
~Preferences();
~Preferences() override;
enum Pages
{
NotifyPage,
......
......@@ -23,13 +23,13 @@ class QuickButtons_Config : public QWidget, public KonviSettingsPage, private Ui
public:
explicit QuickButtons_Config(QWidget* parent, const char* name=NULL);
~QuickButtons_Config();
~QuickButtons_Config() override;
virtual void saveSettings();
virtual void loadSettings();
virtual void restorePageToDefaults();
void saveSettings() override;
void loadSettings() override;
void restorePageToDefaults() override;
virtual bool hasChanged();
bool hasChanged() override;
Q_SIGNALS:
void modified();
......
......@@ -38,17 +38,17 @@ class KonviSettingsDialog : public ConfigDialog
public:
explicit KonviSettingsDialog(QWidget *parent);
~KonviSettingsDialog();
~KonviSettingsDialog() override;
protected Q_SLOTS:
virtual void updateSettings();
virtual void updateWidgets();
virtual void updateWidgetsDefault();
void updateSettings() override;
void updateWidgets() override;
void updateWidgetsDefault() override;
void modifiedSlot();
protected:
virtual bool hasChanged();
virtual bool isDefault();
bool hasChanged() override;
bool isDefault() override;
Warnings_Config* m_confWarningsWdg;
Theme_Config* m_confThemeWdg;
......
......@@ -21,13 +21,13 @@ class Tabs_Config : public QWidget, private Ui::Tabs_PreferencesUI
public:
explicit Tabs_Config(QWidget *parent = 0, const char *name = 0);
~Tabs_Config();
~Tabs_Config() override;
protected Q_SLOTS:
void toggleCheckBoxes(int activated);
protected:
virtual void showEvent(QShowEvent *event);
void showEvent(QShowEvent *event) override;
};
#endif
......@@ -27,13 +27,13 @@ class Theme_Config : public QWidget, public KonviSettingsPage, private Ui::Theme
public:
explicit Theme_Config(QWidget* parent, const char* name=NULL);
~Theme_Config();
~Theme_Config() override;
virtual void restorePageToDefaults();
virtual void saveSettings();
virtual void loadSettings();
void restorePageToDefaults() override;
void saveSettings() override;
void loadSettings() override;
virtual bool hasChanged();
bool hasChanged() override;
Q_SIGNALS:
void modified();
......
......@@ -23,13 +23,13 @@ class Warnings_Config : public QWidget, public KonviSettingsPage, private Ui::Wa
public:
explicit Warnings_Config( QWidget* parent = 0, const char* name = 0, Qt::WindowFlags fl = 0 );
~Warnings_Config();
~Warnings_Config() override;
virtual void restorePageToDefaults();
virtual void saveSettings();
virtual void loadSettings();
void restorePageToDefaults() override;
void saveSettings() override;
void loadSettings() override;
virtual bool hasChanged();
bool hasChanged() override;
public Q_SLOTS:
virtual void languageChange();
......
......@@ -27,7 +27,7 @@ class ConnectionManager : public QObject
public:
explicit ConnectionManager(QObject* parent = 0);
~ConnectionManager();
~ConnectionManager() override;
uint connectionCount() const { return m_connectionList.count(); }
......
......@@ -51,7 +51,7 @@ namespace Konversation
};
explicit Chat(QObject *parent);
~Chat();
~Chat() override;
quint16 ownPort() const;
QString ownNick() const;
......
......@@ -31,23 +31,23 @@ namespace Konversation
public:
ChatContainer(QWidget *parent, Chat *chat);
~ChatContainer();
~ChatContainer() override;
// ChatWindow
virtual bool closeYourself(bool askForConfirmation=true);
virtual bool canBeFrontView();
virtual bool searchView();
bool closeYourself(bool askForConfirmation=true) override;
bool canBeFrontView() override;
bool searchView() override;
virtual void setChannelEncoding(const QString &encoding);
virtual QString getChannelEncoding();
virtual QString getChannelEncodingDefaultDesc();
virtual void emitUpdateInfo();
void setChannelEncoding(const QString &encoding) override;
QString getChannelEncoding() override;
QString getChannelEncodingDefaultDesc() override;
void emitUpdateInfo() override;
QString ownNick() const;
protected:
/** Called from ChatWindow adjustFocus */
virtual void childAdjustFocus();
void childAdjustFocus() override;
public Q_SLOTS:
void setPartnerNick(const QString &nick);
......
......@@ -28,7 +28,7 @@ public:
bool passiveSend();
QSize sizeHint() const;
QSize sizeHint() const override;
private:
KFileWidget* m_fileWidget;
......
......@@ -34,7 +34,7 @@ namespace Konversation
public:
RecipientDialog(QWidget* parent, QAbstractListModel* model);
~RecipientDialog();
~RecipientDialog() override;
static QString getNickname(QWidget* parent, QAbstractListModel* model);
......
......@@ -41,7 +41,7 @@ namespace Konversation
RA_OverwriteDefaultPath = 1 << 4
};
virtual ~ResumeDialog();
~ResumeDialog() override;
static ReceiveAction ask(TransferRecv* item, const QString& message, int enabledActions, ReceiveAction defaultAction);
......
......@@ -64,7 +64,7 @@ namespace Konversation
};
Transfer(Type dccType, QObject *parent);
virtual ~Transfer();
~Transfer() override;
Type getType() const;
Status getStatus() const;
......
......@@ -32,7 +32,7 @@ namespace Konversation
public:
explicit TransferDetailedInfoPanel(QWidget *parent = 0);
virtual ~TransferDetailedInfoPanel();
~TransferDetailedInfoPanel() override;
void setTransfer(Transfer *item);
Transfer *transfer() const;
......
......@@ -81,9 +81,9 @@ namespace Konversation
public:
explicit TransferSizeDelegate(KCategoryDrawer* categoryDrawer, QObject *parent = 0);
virtual QSize sizeHint(const QStyleOptionViewItem & option, const QModelIndex & index) const;
virtual void paint(QPainter *painter, const QStyleOptionViewItem & option,
const QModelIndex &index) const;
QSize sizeHint(const QStyleOptionViewItem & option, const QModelIndex & index) const override;
void paint(QPainter *painter, const QStyleOptionViewItem & option,
const QModelIndex &index) const override;
private:
KCategoryDrawer* m_categoryDrawer;
};
......@@ -93,8 +93,8 @@ namespace Konversation
public:
explicit TransferProgressBarDelegate(QObject *parent = 0);
virtual void paint(QPainter *painter, const QStyleOptionViewItem & option,
const QModelIndex &index) const;
void paint(QPainter *painter, const QStyleOptionViewItem & option,
const QModelIndex &index) const override;
};
......@@ -103,7 +103,7 @@ namespace Konversation
public:
explicit TransferListProxyModel(QObject *parent = 0);
bool lessThan(const QModelIndex &left, const QModelIndex &right) const;
bool lessThan(const QModelIndex &left, const QModelIndex &right) const override;
};
......@@ -128,21 +128,21 @@ namespace Konversation
void appendHeader(TransferHeaderData data);
int columnCount(const QModelIndex &parent = QModelIndex()) const;
int columnCount(const QModelIndex &parent = QModelIndex()) const override;
// counts the rows regardless of what type they are
int rowCount(const QModelIndex &parent = QModelIndex()) const;
int rowCount(const QModelIndex &parent = QModelIndex()) const override;
// itemCount only counts the transferitems, not the CategoryItems
int itemCount(TransferItemData::ItemDisplayType displaytype) const;
QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const;
QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const override;
QVariant headerData (int section, Qt::Orientation orientation,
int role = Qt::DisplayRole) const;
int role = Qt::DisplayRole) const override;
bool removeRow (int row, const QModelIndex &parent = QModelIndex());
virtual bool removeRows (int row, int count,
const QModelIndex &parent = QModelIndex());
bool removeRows (int row, int count,
const QModelIndex &parent = QModelIndex()) override;
Qt::ItemFlags flags (const QModelIndex &index) const;
Qt::ItemFlags flags (const QModelIndex &index) const override;
static QString getStatusText(Transfer::Status status, Transfer::Type type);
static QString getSpeedPrettyText(transferspeed_t speed);
......
......@@ -45,7 +45,7 @@ namespace Konversation
public:
explicit TransferManager(QObject* parent = 0);
~TransferManager();
~TransferManager() override;
Q_SIGNALS:
/*
......
......@@ -45,7 +45,7 @@ namespace Konversation
public:
explicit TransferPanel(QWidget *parent);
~TransferPanel();
~TransferPanel() override;
TransferView *getTransferView();
......@@ -76,7 +76,7 @@ namespace Konversation
protected:
/** Called from ChatWindow adjustFocus */
virtual void childAdjustFocus();
void childAdjustFocus() override;
private:
inline void initGUI();
......
......@@ -48,7 +48,7 @@ namespace Konversation
public:
explicit TransferRecv(QObject *parent);
virtual ~TransferRecv();
~TransferRecv() override;
// REQUIRED
void setPartnerIp(const QString &ip);
......@@ -64,19 +64,19 @@ namespace Konversation
void setReverse(bool reverse, const QString &reverseToken);
public Q_SLOTS:
virtual bool queue();
bool queue() override;
/** The user has accepted the download.
* Check we are saving it somewhere valid, create any directories needed, and
* connect to remote host.
*/
virtual void start();
void start() override;
/** The user has chosen to abort.
* Either by chosen to abort directly, or by choosing cancel when
* prompted for information on where to save etc.
* Not called when it fails due to another problem.
*/
virtual void abort();
void abort() override;
void startResume(quint64 position);
protected Q_SLOTS:
......@@ -101,7 +101,7 @@ namespace Konversation
void sendReverseAck(bool error, quint16 port);
protected:
void cleanUp();
void cleanUp() override;
// (startPosition == 0) means "don't resume"
void prepareLocalKio(bool overwrite, bool resume, KIO::fileoffset_t startPosition = 0);
......@@ -152,7 +152,7 @@ namespace Konversation
public:
explicit TransferRecvWriteCacheHandler(KIO::TransferJob *transferJob);
virtual ~TransferRecvWriteCacheHandler();
~TransferRecvWriteCacheHandler() override;
void append(char *data, int size);
bool write(bool force = false);
......
......@@ -40,7 +40,7 @@ namespace Konversation
public:
explicit TransferSend(QObject *parent);
virtual ~TransferSend();
~TransferSend() override;
// REQUIRED
void setFileURL(const QUrl &url);
......@@ -59,9 +59,9 @@ namespace Konversation
void reject();
public Q_SLOTS:
virtual bool queue();
virtual void start();
virtual void abort();
bool queue() override;
void start() override;
void abort() override;
// invoked when the receiver accepts the offer (Reverse DCC)
void connectToReceiver(const QString &partnerHost, quint16 partnerPort);
......@@ -79,7 +79,7 @@ namespace Konversation
void slotLocalCopyReady(KJob *job);
protected:
void cleanUp();
void cleanUp() override;
void startConnectionTimer(int secs);
void stopConnectionTimer();
......
......@@ -39,7 +39,7 @@ namespace Konversation