Use override
This commit is contained in:
parent
dda2c411fb
commit
533a5d0939
|
@ -94,7 +94,7 @@ class LIB_SYNCTHING_CONNECTOR_EXPORT SyncthingConnection : public QObject {
|
|||
public:
|
||||
explicit SyncthingConnection(
|
||||
const QString &syncthingUrl = QStringLiteral("http://localhost:8080"), const QByteArray &apiKey = QByteArray(), QObject *parent = nullptr);
|
||||
~SyncthingConnection();
|
||||
~SyncthingConnection() override;
|
||||
|
||||
const QString &syncthingUrl() const;
|
||||
void setSyncthingUrl(const QString &url);
|
||||
|
|
|
@ -33,7 +33,7 @@ public:
|
|||
SyncthingInfoAction(QObject *parent = nullptr);
|
||||
|
||||
protected:
|
||||
QWidget *createWidget(QWidget *parent);
|
||||
QWidget *createWidget(QWidget *parent) override;
|
||||
};
|
||||
|
||||
class SyncthingDirActions : public QObject {
|
||||
|
|
|
@ -27,15 +27,15 @@ public:
|
|||
explicit SyncthingDeviceModel(SyncthingConnection &connection, QObject *parent = nullptr);
|
||||
|
||||
public Q_SLOTS:
|
||||
QHash<int, QByteArray> roleNames() const;
|
||||
const QVector<int> &colorRoles() const;
|
||||
QModelIndex index(int row, int column, const QModelIndex &parent = QModelIndex()) const;
|
||||
QModelIndex parent(const QModelIndex &child) const;
|
||||
QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const;
|
||||
QVariant data(const QModelIndex &index, int role) const;
|
||||
bool setData(const QModelIndex &index, const QVariant &value, int role);
|
||||
int rowCount(const QModelIndex &parent) const;
|
||||
int columnCount(const QModelIndex &parent) const;
|
||||
QHash<int, QByteArray> roleNames() const override;
|
||||
const QVector<int> &colorRoles() const override;
|
||||
QModelIndex index(int row, int column, const QModelIndex &parent = QModelIndex()) const override;
|
||||
QModelIndex parent(const QModelIndex &child) const override;
|
||||
QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const override;
|
||||
QVariant data(const QModelIndex &index, int role) const override;
|
||||
bool setData(const QModelIndex &index, const QVariant &value, int role) override;
|
||||
int rowCount(const QModelIndex &parent) const override;
|
||||
int columnCount(const QModelIndex &parent) const override;
|
||||
const SyncthingDev *devInfo(const QModelIndex &index) const;
|
||||
|
||||
private Q_SLOTS:
|
||||
|
|
|
@ -27,15 +27,15 @@ public:
|
|||
explicit SyncthingDirectoryModel(SyncthingConnection &connection, QObject *parent = nullptr);
|
||||
|
||||
public Q_SLOTS:
|
||||
QHash<int, QByteArray> roleNames() const;
|
||||
const QVector<int> &colorRoles() const;
|
||||
QModelIndex index(int row, int column, const QModelIndex &parent = QModelIndex()) const;
|
||||
QModelIndex parent(const QModelIndex &child) const;
|
||||
QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const;
|
||||
QVariant data(const QModelIndex &index, int role) const;
|
||||
bool setData(const QModelIndex &index, const QVariant &value, int role);
|
||||
int rowCount(const QModelIndex &parent) const;
|
||||
int columnCount(const QModelIndex &parent) const;
|
||||
QHash<int, QByteArray> roleNames() const override;
|
||||
const QVector<int> &colorRoles() const override;
|
||||
QModelIndex index(int row, int column, const QModelIndex &parent = QModelIndex()) const override;
|
||||
QModelIndex parent(const QModelIndex &child) const override;
|
||||
QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const override;
|
||||
QVariant data(const QModelIndex &index, int role) const override;
|
||||
bool setData(const QModelIndex &index, const QVariant &value, int role) override;
|
||||
int rowCount(const QModelIndex &parent) const override;
|
||||
int columnCount(const QModelIndex &parent) const override;
|
||||
const SyncthingDir *dirInfo(const QModelIndex &index) const;
|
||||
|
||||
private Q_SLOTS:
|
||||
|
|
|
@ -23,14 +23,14 @@ public:
|
|||
enum SyncthingDownloadModelRole { ItemPercentage = Qt::UserRole + 1, ItemProgressLabel, ItemPath };
|
||||
|
||||
public Q_SLOTS:
|
||||
QHash<int, QByteArray> roleNames() const;
|
||||
QModelIndex index(int row, int column, const QModelIndex &parent = QModelIndex()) const;
|
||||
QModelIndex parent(const QModelIndex &child) const;
|
||||
QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const;
|
||||
QVariant data(const QModelIndex &index, int role) const;
|
||||
bool setData(const QModelIndex &index, const QVariant &value, int role);
|
||||
int rowCount(const QModelIndex &parent) const;
|
||||
int columnCount(const QModelIndex &parent) const;
|
||||
QHash<int, QByteArray> roleNames() const override;
|
||||
QModelIndex index(int row, int column, const QModelIndex &parent = QModelIndex()) const override;
|
||||
QModelIndex parent(const QModelIndex &child) const override;
|
||||
QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const override;
|
||||
QVariant data(const QModelIndex &index, int role) const override;
|
||||
bool setData(const QModelIndex &index, const QVariant &value, int role) override;
|
||||
int rowCount(const QModelIndex &parent) const override;
|
||||
int columnCount(const QModelIndex &parent) const override;
|
||||
const SyncthingDir *dirInfo(const QModelIndex &index) const;
|
||||
const SyncthingItemDownloadProgress *progressInfo(const QModelIndex &index) const;
|
||||
unsigned int pendingDownloads() const;
|
||||
|
|
|
@ -95,7 +95,7 @@ public:
|
|||
void setPassiveStates(const QList<Models::ChecklistItem> &passiveStates);
|
||||
|
||||
public Q_SLOTS:
|
||||
void init() Q_DECL_OVERRIDE;
|
||||
void init() override;
|
||||
void showSettingsDlg();
|
||||
void showWebUI();
|
||||
void showLog();
|
||||
|
|
|
@ -12,7 +12,7 @@ class DevButtonsItemDelegate : public QStyledItemDelegate {
|
|||
public:
|
||||
DevButtonsItemDelegate(QObject *parent);
|
||||
|
||||
void paint(QPainter *, const QStyleOptionViewItem &, const QModelIndex &) const;
|
||||
void paint(QPainter *, const QStyleOptionViewItem &, const QModelIndex &) const override;
|
||||
|
||||
private:
|
||||
const QPixmap m_pauseIcon;
|
||||
|
|
|
@ -18,7 +18,7 @@ Q_SIGNALS:
|
|||
void pauseResumeDev(const Data::SyncthingDev &dev);
|
||||
|
||||
protected:
|
||||
void mouseReleaseEvent(QMouseEvent *event);
|
||||
void mouseReleaseEvent(QMouseEvent *event) override;
|
||||
|
||||
private Q_SLOTS:
|
||||
void showContextMenu();
|
||||
|
|
|
@ -11,7 +11,7 @@ class DirButtonsItemDelegate : public QStyledItemDelegate {
|
|||
public:
|
||||
DirButtonsItemDelegate(QObject *parent);
|
||||
|
||||
void paint(QPainter *, const QStyleOptionViewItem &, const QModelIndex &) const;
|
||||
void paint(QPainter *, const QStyleOptionViewItem &, const QModelIndex &) const override;
|
||||
|
||||
private:
|
||||
const QPixmap m_refreshIcon;
|
||||
|
|
|
@ -20,7 +20,7 @@ Q_SIGNALS:
|
|||
void pauseResumeDir(const Data::SyncthingDir &dir);
|
||||
|
||||
protected:
|
||||
void mouseReleaseEvent(QMouseEvent *event);
|
||||
void mouseReleaseEvent(QMouseEvent *event) override;
|
||||
|
||||
private Q_SLOTS:
|
||||
void showContextMenu();
|
||||
|
|
|
@ -11,8 +11,8 @@ class DownloadItemDelegate : public QStyledItemDelegate {
|
|||
public:
|
||||
DownloadItemDelegate(QObject *parent);
|
||||
|
||||
void paint(QPainter *, const QStyleOptionViewItem &, const QModelIndex &) const;
|
||||
QSize sizeHint(const QStyleOptionViewItem &option, const QModelIndex &index) const;
|
||||
void paint(QPainter *, const QStyleOptionViewItem &, const QModelIndex &) const override;
|
||||
QSize sizeHint(const QStyleOptionViewItem &option, const QModelIndex &index) const override;
|
||||
|
||||
private:
|
||||
const QPixmap m_folderIcon;
|
||||
|
|
|
@ -20,7 +20,7 @@ Q_SIGNALS:
|
|||
void openItemDir(const Data::SyncthingItemDownloadProgress &dir);
|
||||
|
||||
protected:
|
||||
void mouseReleaseEvent(QMouseEvent *event);
|
||||
void mouseReleaseEvent(QMouseEvent *event) override;
|
||||
|
||||
private Q_SLOTS:
|
||||
void showContextMenu();
|
||||
|
|
|
@ -14,7 +14,7 @@ class TrayMenu : public QMenu {
|
|||
public:
|
||||
TrayMenu(TrayIcon *trayIcon = nullptr, QWidget *parent = nullptr);
|
||||
|
||||
QSize sizeHint() const;
|
||||
QSize sizeHint() const override;
|
||||
TrayWidget &widget();
|
||||
const TrayWidget &widget() const;
|
||||
TrayIcon *icon();
|
||||
|
|
|
@ -43,7 +43,7 @@ class TrayWidget : public QWidget {
|
|||
|
||||
public:
|
||||
TrayWidget(TrayMenu *parent = nullptr);
|
||||
~TrayWidget();
|
||||
~TrayWidget() override;
|
||||
|
||||
Data::SyncthingConnection &connection();
|
||||
const Data::SyncthingConnection &connection() const;
|
||||
|
|
|
@ -13,7 +13,7 @@ namespace QtGui {
|
|||
class SYNCTHINGWIDGETS_EXPORT ErrorViewDialog : public TextViewDialog {
|
||||
Q_OBJECT
|
||||
public:
|
||||
~ErrorViewDialog();
|
||||
~ErrorViewDialog() override;
|
||||
static ErrorViewDialog *instance();
|
||||
static void addError(InternalError &&newError);
|
||||
|
||||
|
|
|
@ -30,7 +30,7 @@ Q_SIGNALS:
|
|||
void reload();
|
||||
|
||||
protected:
|
||||
void keyPressEvent(QKeyEvent *event);
|
||||
void keyPressEvent(QKeyEvent *event) override;
|
||||
|
||||
private:
|
||||
void showLogEntries(const std::vector<Data::SyncthingLogEntry> &logEntries);
|
||||
|
|
|
@ -115,7 +115,7 @@ public:
|
|||
explicit SettingsDialog(Data::SyncthingConnection *connection, QWidget *parent = nullptr);
|
||||
explicit SettingsDialog(const QList<Dialogs::OptionCategory *> &categories, QWidget *parent = nullptr);
|
||||
explicit SettingsDialog(QWidget *parent = nullptr);
|
||||
~SettingsDialog();
|
||||
~SettingsDialog() override;
|
||||
|
||||
private:
|
||||
void init();
|
||||
|
|
|
@ -28,12 +28,12 @@ public:
|
|||
static bool isSamePage(const QUrl &url1, const QUrl &url2);
|
||||
|
||||
protected:
|
||||
SYNCTHINGWIDGETS_WEB_PAGE *createWindow(WebWindowType type);
|
||||
SYNCTHINGWIDGETS_WEB_PAGE *createWindow(WebWindowType type) override;
|
||||
#ifdef SYNCTHINGWIDGETS_USE_WEBENGINE
|
||||
bool certificateError(const QWebEngineCertificateError &certificateError);
|
||||
bool acceptNavigationRequest(const QUrl &url, NavigationType type, bool isMainFrame);
|
||||
bool certificateError(const QWebEngineCertificateError &certificateError) override;
|
||||
bool acceptNavigationRequest(const QUrl &url, NavigationType type, bool isMainFrame) override;
|
||||
void javaScriptConsoleMessage(
|
||||
QWebEnginePage::JavaScriptConsoleMessageLevel level, const QString &message, int lineNumber, const QString &sourceID);
|
||||
QWebEnginePage::JavaScriptConsoleMessageLevel level, const QString &message, int lineNumber, const QString &sourceID) override;
|
||||
#else
|
||||
bool acceptNavigationRequest(QWebFrame *frame, const QNetworkRequest &request, NavigationType type);
|
||||
void javaScriptConsoleMessage(const QString &message, int lineNumber, const QString &sourceID);
|
||||
|
|
|
@ -21,7 +21,7 @@ class SYNCTHINGWIDGETS_EXPORT WebViewDialog : public QMainWindow {
|
|||
Q_OBJECT
|
||||
public:
|
||||
WebViewDialog(QWidget *parent = nullptr);
|
||||
~WebViewDialog();
|
||||
~WebViewDialog() override;
|
||||
|
||||
public slots:
|
||||
void applySettings(const Data::SyncthingConnectionSettings &connectionSettings);
|
||||
|
@ -32,10 +32,10 @@ public slots:
|
|||
void closeUnlessModalVisible();
|
||||
|
||||
protected:
|
||||
void closeEvent(QCloseEvent *event);
|
||||
void keyPressEvent(QKeyEvent *event);
|
||||
void closeEvent(QCloseEvent *event) override;
|
||||
void keyPressEvent(QKeyEvent *event) override;
|
||||
#if defined(SYNCTHINGWIDGETS_USE_WEBENGINE)
|
||||
bool eventFilter(QObject *watched, QEvent *event);
|
||||
bool eventFilter(QObject *watched, QEvent *event) override;
|
||||
#endif
|
||||
|
||||
private:
|
||||
|
|
|
@ -16,7 +16,7 @@ class WebViewInterceptor : public QWebEngineUrlRequestInterceptor {
|
|||
public:
|
||||
explicit WebViewInterceptor(const Data::SyncthingConnectionSettings &settings, QObject *parent = nullptr);
|
||||
|
||||
virtual void interceptRequest(QWebEngineUrlRequestInfo &info);
|
||||
virtual void interceptRequest(QWebEngineUrlRequestInfo &info) override;
|
||||
|
||||
private:
|
||||
const Data::SyncthingConnectionSettings &m_settings;
|
||||
|
|
Loading…
Reference in New Issue