Commit 58022184 authored by Kevin Funk's avatar Kevin Funk

clang-tidy: modernize-use-override run

parent dfe28778
......@@ -40,7 +40,7 @@ class BookmarkManager : public QObject, public KBookmarkOwner
public:
BookmarkManager(KActionCollection *collection, QMenu *menu, MainWindow *parent);
~BookmarkManager();
~BookmarkManager() override;
QUrl currentUrl() const Q_DECL_OVERRIDE;
QString currentTitle() const Q_DECL_OVERRIDE;
......@@ -61,8 +61,8 @@ Q_SIGNALS:
void openUrl(const QUrl &url);
private Q_SLOTS:
void openBookmark(const KBookmark &bm, Qt::MouseButtons, Qt::KeyboardModifiers);
void openFolderinTabs(const KBookmarkGroup &bookmarkGroup);
void openBookmark(const KBookmark &bm, Qt::MouseButtons, Qt::KeyboardModifiers) override;
void openFolderinTabs(const KBookmarkGroup &bookmarkGroup) override;
private:
QString urlForView(RemoteView *view) const;
......
......@@ -40,7 +40,7 @@ class HostPreferencesList : public QWidget
public:
HostPreferencesList(QWidget *parent, MainWindow *mainWindow, KConfigGroup hostPrefsConfig);
~HostPreferencesList();
~HostPreferencesList() override;
private Q_SLOTS:
void readConfig();
......
......@@ -39,7 +39,7 @@ public:
PreferencesDialog(QWidget *parent, KConfigSkeleton *config);
protected:
virtual bool isDefault();
bool isDefault() override;
private Q_SLOTS:
void saveState();
......
......@@ -31,9 +31,9 @@ class ConnectionDelegate : public QStyledItemDelegate
Q_OBJECT
public:
explicit ConnectionDelegate(QObject *parent = 0);
QString displayText(const QVariant &value, const QLocale& locale) const;
void paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const;
QSize sizeHint(const QStyleOptionViewItem &option, const QModelIndex &index) const;
QString displayText(const QVariant &value, const QLocale& locale) const override;
void paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const override;
QSize sizeHint(const QStyleOptionViewItem &option, const QModelIndex &index) const override;
};
#endif // CONNECTIONDELEGATE_H
......@@ -37,7 +37,7 @@ class KRDCCORE_EXPORT HostPreferences : public QObject
Q_OBJECT
public:
~HostPreferences();
~HostPreferences() override;
KConfigGroup configGroup();
......
......@@ -126,7 +126,7 @@ public:
Authentication
};
virtual ~RemoteView();
~RemoteView() override;
/**
* Checks whether the backend supports scaling. The
......@@ -379,8 +379,8 @@ Q_SIGNALS:
protected:
RemoteView(QWidget *parent = 0);
void focusInEvent(QFocusEvent *event);
void focusOutEvent(QFocusEvent *event);
void focusInEvent(QFocusEvent *event) override;
void focusOutEvent(QFocusEvent *event) override;
/**
* The status of the remote view.
......
......@@ -42,7 +42,7 @@ public:
/**
* Deconstructor.
*/
virtual ~RemoteViewFactory();
~RemoteViewFactory() override;
/**
* Returns true if the provided @p url is supported by the current plugin.
......
......@@ -40,7 +40,7 @@ class FloatingToolBar : public QToolBar
Q_OBJECT
public:
FloatingToolBar(QWidget *parent, QWidget *anchorWidget);
~FloatingToolBar();
~FloatingToolBar() override;
Q_ENUMS(Side)
enum Side { Left = 0, Top = 1, Right = 2, Bottom = 3 };
......@@ -57,14 +57,14 @@ public Q_SLOTS:
void hideAndDestroy();
protected:
bool eventFilter(QObject *o, QEvent *e);
void paintEvent(QPaintEvent *);
void mousePressEvent(QMouseEvent *e);
void mouseMoveEvent(QMouseEvent *e);
void enterEvent(QEvent *e);
void leaveEvent(QEvent *e);
void mouseReleaseEvent(QMouseEvent *e);
void wheelEvent(QWheelEvent *e);
bool eventFilter(QObject *o, QEvent *e) override;
void paintEvent(QPaintEvent *) override;
void mousePressEvent(QMouseEvent *e) override;
void mouseMoveEvent(QMouseEvent *e) override;
void enterEvent(QEvent *e) override;
void leaveEvent(QEvent *e) override;
void mouseReleaseEvent(QMouseEvent *e) override;
void wheelEvent(QWheelEvent *e) override;
private:
class FloatingToolBarPrivate *d;
......
......@@ -57,7 +57,7 @@ class MainWindow : public KXmlGuiWindow
Q_OBJECT
public:
explicit MainWindow(QWidget *parent = 0);
~MainWindow();
~MainWindow() override;
QMap<QWidget *, RemoteView *> remoteViewList() const;
QList<RemoteViewFactory *> remoteViewFactoriesList() const;
......@@ -67,9 +67,9 @@ public Q_SLOTS:
void newConnection(const QUrl &newUrl = QUrl(), bool switchFullscreenWhenConnected = false, const QString &tabName = QString());
protected:
virtual void closeEvent(QCloseEvent *event);
bool eventFilter(QObject *obj, QEvent *event); // checks for close events on fs window
virtual void saveProperties(KConfigGroup &group);
void closeEvent(QCloseEvent *event) override;
bool eventFilter(QObject *obj, QEvent *event) override; // checks for close events on fs window
void saveProperties(KConfigGroup &group) override;
void saveHostPrefs();
void saveHostPrefs(RemoteView *view);
......@@ -154,7 +154,7 @@ Q_SIGNALS:
void rightClicked();
protected:
void mousePressEvent(QMouseEvent *event) {
void mousePressEvent(QMouseEvent *event) override {
if (event->button() == Qt::RightButton)
emit rightClicked();
}
......@@ -174,7 +174,7 @@ Q_SIGNALS:
void resized(int w, int h);
protected:
void resizeEvent(QResizeEvent *event) {
void resizeEvent(QResizeEvent *event) override {
QScrollArea::resizeEvent(event);
emit resized(width() - 2*frameWidth(), height() - 2*frameWidth());
}
......
......@@ -34,7 +34,7 @@ class RdpHostPreferences : public HostPreferences
public:
explicit RdpHostPreferences(KConfigGroup configGroup, QObject *parent = 0);
~RdpHostPreferences();
~RdpHostPreferences() override;
void setResolution(int resolution);
int resolution() const;
......@@ -58,8 +58,8 @@ public:
QString shareMedia() const;
protected:
QWidget* createProtocolSpecificConfigPage();
void acceptConfig();
QWidget* createProtocolSpecificConfigPage() override;
void acceptConfig() override;
private:
Ui::RdpPreferences rdpUi;
......
......@@ -34,10 +34,10 @@ class RdpPreferences : public KCModule
public:
explicit RdpPreferences(QWidget *parent = 0, const QVariantList &args = QVariantList());
~RdpPreferences();
~RdpPreferences() override;
virtual void save();
virtual void load();
void save() override;
void load() override;
};
......
......@@ -49,27 +49,27 @@ public:
const QString &user = QString(),
const QString &password = QString());
virtual ~RdpView();
~RdpView() override;
// functions regarding the window
virtual QSize framebufferSize(); // returns the size of the remote view
QSize sizeHint() const; // returns the suggested size
QSize framebufferSize() override; // returns the size of the remote view
QSize sizeHint() const override; // returns the suggested size
// functions regarding the connection
virtual void startQuitting(); // start closing the connection
virtual bool isQuitting(); // are we currently closing the connection?
virtual bool start(); // open a connection
void setGrabAllKeys(bool grabAllKeys);
void startQuitting() override; // start closing the connection
bool isQuitting() override; // are we currently closing the connection?
bool start() override; // open a connection
void setGrabAllKeys(bool grabAllKeys) override;
HostPreferences* hostPreferences();
HostPreferences* hostPreferences() override;
virtual QPixmap takeScreenshot();
QPixmap takeScreenshot() override;
public Q_SLOTS:
virtual void switchFullscreen(bool on);
void switchFullscreen(bool on) override;
protected:
bool eventFilter(QObject *obj, QEvent *event);
bool eventFilter(QObject *obj, QEvent *event) override;
private:
// Marks if connectionClosed should close the connection if m_quitFlag is true.
......
......@@ -36,21 +36,21 @@ class RdpViewFactory : public RemoteViewFactory
public:
explicit RdpViewFactory(QObject *parent, const QVariantList &args);
virtual ~RdpViewFactory();
~RdpViewFactory() override;
virtual bool supportsUrl(const QUrl &url) const;
bool supportsUrl(const QUrl &url) const override;
virtual RemoteView *createView(QWidget *parent, const QUrl &url, KConfigGroup configGroup);
RemoteView *createView(QWidget *parent, const QUrl &url, KConfigGroup configGroup) override;
virtual HostPreferences *createHostPreferences(KConfigGroup configGroup, QWidget *parent);
HostPreferences *createHostPreferences(KConfigGroup configGroup, QWidget *parent) override;
virtual QString scheme() const;
QString scheme() const override;
virtual QString connectActionText() const;
QString connectActionText() const override;
virtual QString connectButtonText() const;
QString connectButtonText() const override;
virtual QString connectToolTipText() const;
QString connectToolTipText() const override;
private Q_SLOTS:
void checkFreerdpAvailability();
......
......@@ -62,16 +62,16 @@ class RemoteDesktopsModel : public QAbstractTableModel
public:
explicit RemoteDesktopsModel(QObject *parent, KBookmarkManager *manager);
~RemoteDesktopsModel();
~RemoteDesktopsModel() override;
enum DisplayItems { Favorite, Title, LastConnected, VisitCount, Created, Source };
int rowCount(const QModelIndex &parent = QModelIndex()) const;
int columnCount(const QModelIndex &parent = QModelIndex()) const;
Qt::ItemFlags flags(const QModelIndex &index) const;
bool setData(const QModelIndex &index, const QVariant &value, int role = Qt::EditRole);
QVariant data(const QModelIndex &index, int role) const;
int rowCount(const QModelIndex &parent = QModelIndex()) const override;
int columnCount(const QModelIndex &parent = QModelIndex()) const override;
Qt::ItemFlags flags(const QModelIndex &index) const override;
bool setData(const QModelIndex &index, const QVariant &value, int role = Qt::EditRole) override;
QVariant data(const QModelIndex &index, int role) const override;
QVariant headerData(int section, Qt::Orientation orientation,
int role = Qt::DisplayRole) const;
int role = Qt::DisplayRole) const override;
private:
QList<RemoteDesktop> remoteDesktops;
......
......@@ -34,7 +34,7 @@ class SystemTrayIcon : public KStatusNotifierItem
public:
explicit SystemTrayIcon(MainWindow *parent);
~SystemTrayIcon();
~SystemTrayIcon() override;
public Q_SLOTS:
void checkActivatedWindow(bool active);
......
......@@ -34,13 +34,13 @@ class TabbedViewWidgetModel : public QAbstractItemModel
Q_OBJECT
public:
explicit TabbedViewWidgetModel(QTabWidget *modelTarget);
QModelIndex index(int row, int column, const QModelIndex &parent = QModelIndex()) const;
QModelIndex parent(const QModelIndex &index) const;
int rowCount(const QModelIndex &parent = QModelIndex()) const;
int columnCount(const QModelIndex &parent = QModelIndex()) const;
Qt::ItemFlags flags(const QModelIndex &index) const;
bool setData(const QModelIndex &index, const QVariant &value, int role);
QVariant data(const QModelIndex &index, int role) const;
QModelIndex index(int row, int column, const QModelIndex &parent = QModelIndex()) const override;
QModelIndex parent(const QModelIndex &index) const override;
int rowCount(const QModelIndex &parent = QModelIndex()) const override;
int columnCount(const QModelIndex &parent = QModelIndex()) const override;
Qt::ItemFlags flags(const QModelIndex &index) const override;
bool setData(const QModelIndex &index, const QVariant &value, int role) override;
QVariant data(const QModelIndex &index, int role) const override;
protected:
void emitLayoutAboutToBeChanged();
void emitLayoutChanged();
......@@ -55,7 +55,7 @@ class TabbedViewWidget : public QTabWidget
Q_OBJECT
public:
explicit TabbedViewWidget(QWidget *parent = 0);
virtual ~TabbedViewWidget();
~TabbedViewWidget() override;
TabbedViewWidgetModel* getModel();
int addTab(QWidget *page, const QString &label);
int addTab(QWidget *page, const QIcon &icon, const QString &label);
......
......@@ -38,20 +38,20 @@ class TestView : public RemoteView
public:
explicit TestView(QWidget *parent = 0, const QUrl &url = QUrl(), KConfigGroup configGroup = KConfigGroup());
virtual ~TestView();
~TestView() override;
virtual QSize framebufferSize();
QSize sizeHint() const;
QSize framebufferSize() override;
QSize sizeHint() const override;
virtual bool isQuitting();
virtual bool start();
HostPreferences* hostPreferences();
bool isQuitting() override;
bool start() override;
HostPreferences* hostPreferences() override;
public Q_SLOTS:
virtual void switchFullscreen(bool on);
void switchFullscreen(bool on) override;
protected:
bool eventFilter(QObject *obj, QEvent *event);
bool eventFilter(QObject *obj, QEvent *event) override;
private:
TestHostPreferences *m_hostPreferences;
......@@ -69,7 +69,7 @@ public:
: HostPreferences(configGroup, parent) {}
protected:
virtual QWidget* createProtocolSpecificConfigPage() { return 0; };
QWidget* createProtocolSpecificConfigPage() override { return 0; };
};
#endif // TESTVIEW_H
......@@ -35,21 +35,21 @@ class TestViewFactory : public RemoteViewFactory
public:
explicit TestViewFactory(QObject *parent, const QVariantList &args);
virtual ~TestViewFactory();
~TestViewFactory() override;
virtual bool supportsUrl(const QUrl &url) const;
bool supportsUrl(const QUrl &url) const override;
virtual RemoteView *createView(QWidget *parent, const QUrl &url, KConfigGroup configGroup);
RemoteView *createView(QWidget *parent, const QUrl &url, KConfigGroup configGroup) override;
virtual HostPreferences *createHostPreferences(KConfigGroup configGroup, QWidget *parent);
HostPreferences *createHostPreferences(KConfigGroup configGroup, QWidget *parent) override;
virtual QString scheme() const;
QString scheme() const override;
virtual QString connectActionText() const;
QString connectActionText() const override;
virtual QString connectButtonText() const;
QString connectButtonText() const override;
virtual QString connectToolTipText() const;
QString connectToolTipText() const override;
};
#endif // TESTVIEWFACTORY_H
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