forked from qt-creator/qt-creator
Help: Use override consistently
clang-tidy fixes from modernize-use-override check. Change-Id: I3aec6d7ab1e8f088b745d2d9730e3d49ced42031 Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
@@ -39,7 +39,7 @@ class CentralWidget : public HelpWidget
|
||||
|
||||
public:
|
||||
CentralWidget(const Core::Context &context, QWidget *parent = nullptr);
|
||||
~CentralWidget();
|
||||
~CentralWidget() override;
|
||||
|
||||
static CentralWidget *instance();
|
||||
};
|
||||
|
||||
@@ -46,14 +46,14 @@ class DocSettingsPage : public Core::IOptionsPage
|
||||
public:
|
||||
DocSettingsPage();
|
||||
|
||||
QWidget *widget();
|
||||
void apply();
|
||||
void finish();
|
||||
QWidget *widget() override;
|
||||
void apply() override;
|
||||
void finish() override;
|
||||
|
||||
private:
|
||||
void addDocumentation();
|
||||
|
||||
bool eventFilter(QObject *object, QEvent *event);
|
||||
bool eventFilter(QObject *object, QEvent *event) override;
|
||||
void removeDocumentation(const QList<QModelIndex> &items);
|
||||
|
||||
QList<QModelIndex> currentSelection() const;
|
||||
|
||||
@@ -40,9 +40,9 @@ class FilterSettingsPage : public Core::IOptionsPage
|
||||
public:
|
||||
FilterSettingsPage();
|
||||
|
||||
QWidget *widget();
|
||||
void apply();
|
||||
void finish();
|
||||
QWidget *widget() override;
|
||||
void apply() override;
|
||||
void finish() override;
|
||||
|
||||
signals:
|
||||
void filtersChanged();
|
||||
|
||||
@@ -41,9 +41,9 @@ class GeneralSettingsPage : public Core::IOptionsPage
|
||||
public:
|
||||
GeneralSettingsPage();
|
||||
|
||||
QWidget *widget();
|
||||
void apply();
|
||||
void finish();
|
||||
QWidget *widget() override;
|
||||
void apply() override;
|
||||
void finish() override;
|
||||
|
||||
signals:
|
||||
void fontChanged();
|
||||
|
||||
@@ -40,15 +40,15 @@ class HelpViewerFindSupport : public Core::IFindSupport
|
||||
public:
|
||||
HelpViewerFindSupport(HelpViewer *viewer);
|
||||
|
||||
bool supportsReplace() const { return false; }
|
||||
Core::FindFlags supportedFindFlags() const;
|
||||
void resetIncrementalSearch() {}
|
||||
void clearHighlights() {}
|
||||
QString currentFindString() const;
|
||||
QString completedFindString() const { return QString(); }
|
||||
bool supportsReplace() const override { return false; }
|
||||
Core::FindFlags supportedFindFlags() const override;
|
||||
void resetIncrementalSearch() override {}
|
||||
void clearHighlights() override {}
|
||||
QString currentFindString() const override;
|
||||
QString completedFindString() const override { return QString(); }
|
||||
|
||||
Result findIncremental(const QString &txt, Core::FindFlags findFlags);
|
||||
Result findStep(const QString &txt, Core::FindFlags findFlags);
|
||||
Result findIncremental(const QString &txt, Core::FindFlags findFlags) override;
|
||||
Result findStep(const QString &txt, Core::FindFlags findFlags) override;
|
||||
|
||||
private:
|
||||
bool find(const QString &ttf, Core::FindFlags findFlags, bool incremental);
|
||||
|
||||
@@ -49,7 +49,7 @@ public:
|
||||
Q_DECLARE_FLAGS(Actions, Action)
|
||||
|
||||
explicit HelpViewer(QWidget *parent = nullptr);
|
||||
~HelpViewer();
|
||||
~HelpViewer() override;
|
||||
|
||||
virtual QFont viewerFont() const = 0;
|
||||
virtual void setViewerFont(const QFont &font) = 0;
|
||||
|
||||
@@ -59,7 +59,7 @@ public:
|
||||
};
|
||||
|
||||
HelpWidget(const Core::Context &context, WidgetStyle style, QWidget *parent = nullptr);
|
||||
~HelpWidget();
|
||||
~HelpWidget() override;
|
||||
|
||||
HelpViewer *currentViewer() const;
|
||||
void setCurrentViewer(HelpViewer *viewer);
|
||||
@@ -82,7 +82,7 @@ public:
|
||||
void updateCloseButton();
|
||||
|
||||
protected:
|
||||
void closeEvent(QCloseEvent *);
|
||||
void closeEvent(QCloseEvent *) override;
|
||||
|
||||
signals:
|
||||
void openHelpMode(const QUrl &url);
|
||||
|
||||
@@ -58,7 +58,7 @@ public:
|
||||
};
|
||||
|
||||
LocalHelpManager(QObject *parent = nullptr);
|
||||
~LocalHelpManager();
|
||||
~LocalHelpManager() override;
|
||||
|
||||
static LocalHelpManager *instance();
|
||||
|
||||
|
||||
@@ -48,7 +48,7 @@ class OpenPagesManager : public QObject
|
||||
|
||||
public:
|
||||
OpenPagesManager(QObject *parent = nullptr);
|
||||
~OpenPagesManager();
|
||||
~OpenPagesManager() override;
|
||||
|
||||
static OpenPagesManager &instance();
|
||||
|
||||
|
||||
@@ -42,9 +42,9 @@ class OpenPagesModel : public QAbstractTableModel
|
||||
public:
|
||||
OpenPagesModel(QObject *parent);
|
||||
|
||||
int rowCount(const QModelIndex &parent = QModelIndex()) const;
|
||||
int columnCount(const QModelIndex &parent = QModelIndex()) const;
|
||||
QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const;
|
||||
int rowCount(const QModelIndex &parent = QModelIndex()) const override;
|
||||
int columnCount(const QModelIndex &parent = QModelIndex()) const override;
|
||||
QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const override;
|
||||
|
||||
void addPage(const QUrl &url, qreal zoom = 0);
|
||||
void removePage(int index);
|
||||
|
||||
@@ -41,7 +41,7 @@ class OpenPagesSwitcher : public QFrame
|
||||
|
||||
public:
|
||||
OpenPagesSwitcher(OpenPagesModel *model);
|
||||
~OpenPagesSwitcher();
|
||||
~OpenPagesSwitcher() override;
|
||||
|
||||
void gotoNextPage();
|
||||
void gotoPreviousPage();
|
||||
@@ -49,9 +49,9 @@ public:
|
||||
void selectAndHide();
|
||||
void selectCurrentPage();
|
||||
|
||||
void setVisible(bool visible);
|
||||
void focusInEvent(QFocusEvent *event);
|
||||
bool eventFilter(QObject *object, QEvent *event);
|
||||
void setVisible(bool visible) override;
|
||||
void focusInEvent(QFocusEvent *event) override;
|
||||
bool eventFilter(QObject *object, QEvent *event) override;
|
||||
|
||||
signals:
|
||||
void closePage(const QModelIndex &index);
|
||||
|
||||
@@ -38,7 +38,7 @@ class OpenPagesWidget : public Core::OpenDocumentsTreeView
|
||||
|
||||
public:
|
||||
explicit OpenPagesWidget(OpenPagesModel *model, QWidget *parent = nullptr);
|
||||
~OpenPagesWidget();
|
||||
~OpenPagesWidget() override;
|
||||
|
||||
void selectCurrentPage();
|
||||
void allowContextMenu(bool ok);
|
||||
|
||||
@@ -50,7 +50,7 @@ class SearchSideBarItem : public Core::SideBarItem
|
||||
public:
|
||||
SearchSideBarItem();
|
||||
|
||||
QList<QToolButton *> createToolBarWidgets();
|
||||
QList<QToolButton *> createToolBarWidgets() override;
|
||||
|
||||
signals:
|
||||
void linkActivated(const QUrl &url, const QStringList &searchTerms, bool newPage);
|
||||
@@ -62,7 +62,7 @@ class SearchWidget : public QWidget
|
||||
|
||||
public:
|
||||
SearchWidget();
|
||||
~SearchWidget();
|
||||
~SearchWidget() override;
|
||||
|
||||
void zoomIn();
|
||||
void zoomOut();
|
||||
@@ -74,7 +74,7 @@ signals:
|
||||
void linkActivated(const QUrl &link, const QStringList &searchTerms, bool newPage);
|
||||
|
||||
protected:
|
||||
void showEvent(QShowEvent *event);
|
||||
void showEvent(QShowEvent *event) override;
|
||||
|
||||
private:
|
||||
void search() const;
|
||||
@@ -85,8 +85,8 @@ private:
|
||||
void indexingStarted();
|
||||
void indexingFinished();
|
||||
|
||||
bool eventFilter(QObject* o, QEvent *e);
|
||||
void contextMenuEvent(QContextMenuEvent *contextMenuEvent);
|
||||
bool eventFilter(QObject* o, QEvent *e) override;
|
||||
void contextMenuEvent(QContextMenuEvent *contextMenuEvent) override;
|
||||
QStringList currentSearchTerms() const;
|
||||
|
||||
int zoomCount = 0;
|
||||
|
||||
@@ -42,38 +42,38 @@ class TextBrowserHelpViewer : public HelpViewer
|
||||
|
||||
public:
|
||||
explicit TextBrowserHelpViewer(QWidget *parent = nullptr);
|
||||
~TextBrowserHelpViewer();
|
||||
~TextBrowserHelpViewer() override;
|
||||
|
||||
QFont viewerFont() const;
|
||||
void setViewerFont(const QFont &font);
|
||||
QFont viewerFont() const override;
|
||||
void setViewerFont(const QFont &font) override;
|
||||
|
||||
qreal scale() const;
|
||||
void setScale(qreal scale);
|
||||
qreal scale() const override;
|
||||
void setScale(qreal scale) override;
|
||||
|
||||
QString title() const;
|
||||
QString title() const override;
|
||||
|
||||
QUrl source() const;
|
||||
void setSource(const QUrl &url);
|
||||
QUrl source() const override;
|
||||
void setSource(const QUrl &url) override;
|
||||
|
||||
void setHtml(const QString &html);
|
||||
void setHtml(const QString &html) override;
|
||||
|
||||
QString selectedText() const;
|
||||
bool isForwardAvailable() const;
|
||||
bool isBackwardAvailable() const;
|
||||
void addBackHistoryItems(QMenu *backMenu);
|
||||
void addForwardHistoryItems(QMenu *forwardMenu);
|
||||
QString selectedText() const override;
|
||||
bool isForwardAvailable() const override;
|
||||
bool isBackwardAvailable() const override;
|
||||
void addBackHistoryItems(QMenu *backMenu) override;
|
||||
void addForwardHistoryItems(QMenu *forwardMenu) override;
|
||||
|
||||
bool findText(const QString &text, Core::FindFlags flags,
|
||||
bool incremental, bool fromSearch, bool *wrapped = nullptr);
|
||||
bool incremental, bool fromSearch, bool *wrapped = nullptr) override;
|
||||
|
||||
void scaleUp();
|
||||
void scaleDown();
|
||||
void resetScale();
|
||||
void copy();
|
||||
void stop();
|
||||
void forward();
|
||||
void backward();
|
||||
void print(QPrinter *printer);
|
||||
void scaleUp() override;
|
||||
void scaleDown() override;
|
||||
void resetScale() override;
|
||||
void copy() override;
|
||||
void stop() override;
|
||||
void forward() override;
|
||||
void backward() override;
|
||||
void print(QPrinter *printer) override;
|
||||
|
||||
private:
|
||||
void goToHistoryItem();
|
||||
@@ -88,19 +88,19 @@ class TextBrowserHelpWidget : public QTextBrowser
|
||||
public:
|
||||
TextBrowserHelpWidget(TextBrowserHelpViewer *parent);
|
||||
|
||||
QVariant loadResource(int type, const QUrl &name);
|
||||
QVariant loadResource(int type, const QUrl &name) override;
|
||||
|
||||
void scaleUp();
|
||||
void scaleDown();
|
||||
|
||||
void setSource(const QUrl &name);
|
||||
void setSource(const QUrl &name) override;
|
||||
|
||||
protected:
|
||||
void contextMenuEvent(QContextMenuEvent *event);
|
||||
bool eventFilter(QObject *obj, QEvent *event);
|
||||
void wheelEvent(QWheelEvent *e);
|
||||
void mousePressEvent(QMouseEvent *e);
|
||||
void mouseReleaseEvent(QMouseEvent *e);
|
||||
void contextMenuEvent(QContextMenuEvent *event) override;
|
||||
bool eventFilter(QObject *obj, QEvent *event) override;
|
||||
void wheelEvent(QWheelEvent *e) override;
|
||||
void mousePressEvent(QMouseEvent *e) override;
|
||||
void mouseReleaseEvent(QMouseEvent *e) override;
|
||||
|
||||
private:
|
||||
QString linkAt(const QPoint& pos);
|
||||
|
||||
Reference in New Issue
Block a user