diff --git a/app/configappearancewidget.h b/app/configappearancewidget.h index 7bf7dec..ab17de0 100644 --- a/app/configappearancewidget.h +++ b/app/configappearancewidget.h @@ -59,7 +59,7 @@ private Q_SLOTS: void showColorDialog(); private: - void showEvent(QShowEvent *); + void showEvent(QShowEvent *) override; void setHighlightedForeground(const QString &colorName); void setItemToolTip(QTableWidgetItem *item, const QFont &font); diff --git a/app/configdialog.h b/app/configdialog.h index b4875d1..0d918ab 100644 --- a/app/configdialog.h +++ b/app/configdialog.h @@ -46,10 +46,10 @@ class ConfigDialog : public PageDialog void settingsChanged(); private Q_SLOTS: - void accept(); + void accept() override; private: - void keyPressEvent(QKeyEvent *event); + void keyPressEvent(QKeyEvent *event) override; ConfigAppearanceWidget *m_configAppearanceWidget; ConfigEditorWidget *m_configEditorWidget; diff --git a/app/editgotolinewidget.h b/app/editgotolinewidget.h index 33da2e7..f817980 100644 --- a/app/editgotolinewidget.h +++ b/app/editgotolinewidget.h @@ -39,7 +39,7 @@ public Q_SLOTS: void focusEditor(); protected: - virtual void keyPressEvent(QKeyEvent *event); + virtual void keyPressEvent(QKeyEvent *event) override; protected Q_SLOTS: void hide(); diff --git a/app/editindentwidget.h b/app/editindentwidget.h index 60f19cf..6becf53 100644 --- a/app/editindentwidget.h +++ b/app/editindentwidget.h @@ -38,8 +38,8 @@ class IndentWidget : public QWidget void hidden(); protected: - virtual void showEvent(QShowEvent *event); - virtual void keyPressEvent(QKeyEvent *event); + virtual void showEvent(QShowEvent *event) override; + virtual void keyPressEvent(QKeyEvent *event) override; private Q_SLOTS: void indent(); diff --git a/app/editreplacecurrentwidget.h b/app/editreplacecurrentwidget.h index 800bd55..09efc47 100644 --- a/app/editreplacecurrentwidget.h +++ b/app/editreplacecurrentwidget.h @@ -41,8 +41,8 @@ class ReplaceCurrentWidget : public QWidget void hidden(); protected: - virtual void showEvent(QShowEvent *event); - virtual void keyPressEvent(QKeyEvent *event); + virtual void showEvent(QShowEvent *event) override; + virtual void keyPressEvent(QKeyEvent *event) override; protected Q_SLOTS: void hide(); diff --git a/app/editreplacewidget.h b/app/editreplacewidget.h index 94e84f0..0cdb3e3 100644 --- a/app/editreplacewidget.h +++ b/app/editreplacewidget.h @@ -41,8 +41,8 @@ public Q_SLOTS: void replace(const QString &text, const QString &replacement, QTextDocument::FindFlags flags); protected: - virtual void showEvent(QShowEvent *event); - virtual void keyPressEvent(QKeyEvent *event); + virtual void showEvent(QShowEvent *event) override; + virtual void keyPressEvent(QKeyEvent *event) override; protected Q_SLOTS: void hide(); diff --git a/app/linenumberwidget.h b/app/linenumberwidget.h index a6284f7..56f702d 100644 --- a/app/linenumberwidget.h +++ b/app/linenumberwidget.h @@ -29,12 +29,12 @@ class LineNumberWidget : public QWidget Q_OBJECT public: explicit LineNumberWidget(TikzEditor *editor); - QSize sizeHint() const; + QSize sizeHint() const override; protected: - virtual void paintEvent(QPaintEvent *event); - virtual void mousePressEvent(QMouseEvent *event); - virtual void mouseReleaseEvent(QMouseEvent *); + virtual void paintEvent(QPaintEvent *event) override; + virtual void mousePressEvent(QMouseEvent *event) override; + virtual void mouseReleaseEvent(QMouseEvent *) override; private: TikzEditor *m_editor; diff --git a/app/loghighlighter.h b/app/loghighlighter.h index d13cae2..901767d 100644 --- a/app/loghighlighter.h +++ b/app/loghighlighter.h @@ -39,7 +39,7 @@ class LogHighlighter : public QSyntaxHighlighter /** Implements QSyntaxHighlighter::highlightBlock() * @see QSyntaxHighlighter::highlightBlock() */ - void highlightBlock(const QString &text); + void highlightBlock(const QString &text) override; private: struct LogHighlightingRule diff --git a/app/logtextedit.h b/app/logtextedit.h index 661e2a9..8f78c58 100644 --- a/app/logtextedit.h +++ b/app/logtextedit.h @@ -31,7 +31,7 @@ class LogTextEdit : public QTextEdit public: explicit LogTextEdit(QWidget *parent = 0); ~LogTextEdit(); - virtual QSize sizeHint() const; + virtual QSize sizeHint() const override; public Q_SLOTS: void updateLog(const QString &logText); diff --git a/app/mainwindow.h b/app/mainwindow.h index 04f4dee..02c7391 100644 --- a/app/mainwindow.h +++ b/app/mainwindow.h @@ -80,10 +80,10 @@ class MainWindow : public QMainWindow, public MainWidget MainWindow(); virtual ~MainWindow(); - virtual QWidget *widget(); + virtual QWidget *widget() override; bool isDocumentModified() const; - QString tikzCode() const; - QUrl url() const; + QString tikzCode() const override; + QUrl url() const override; void setLineNumber(int lineNumber); int lineNumber() const; @@ -99,11 +99,11 @@ public Q_SLOTS: protected: #ifdef KTIKZ_USE_KDE - bool queryClose(); - void readProperties(const KConfigGroup &group); - void saveProperties(KConfigGroup &group); + bool queryClose() override; + void readProperties(const KConfigGroup &group) override; + void saveProperties(KConfigGroup &group) override; #endif - void closeEvent(QCloseEvent *event); + void closeEvent(QCloseEvent *event) override; private Q_SLOTS: void init(); diff --git a/app/tikzcommandwidget.h b/app/tikzcommandwidget.h index 5f594c0..7376c83 100644 --- a/app/tikzcommandwidget.h +++ b/app/tikzcommandwidget.h @@ -28,7 +28,7 @@ class TikzCommandWidget : public QWidget public: explicit TikzCommandWidget(QWidget *parent = 0); - virtual QSize sizeHint() const; + virtual QSize sizeHint() const override; }; #endif diff --git a/app/tikzeditor.h b/app/tikzeditor.h index 08aeff0..b26ce43 100644 --- a/app/tikzeditor.h +++ b/app/tikzeditor.h @@ -69,12 +69,12 @@ public Q_SLOTS: void tabIndent(bool isUnindenting); protected: - void paintEvent(QPaintEvent *event); - void keyPressEvent(QKeyEvent *event); - void focusInEvent(QFocusEvent *event); - void focusOutEvent(QFocusEvent *event); + void paintEvent(QPaintEvent *event) override; + void keyPressEvent(QKeyEvent *event) override; + void focusInEvent(QFocusEvent *event) override; + void focusOutEvent(QFocusEvent *event) override; int lineNumberAreaWidth(); - void resizeEvent(QResizeEvent *event); + void resizeEvent(QResizeEvent *event) override; private Q_SLOTS: void highlightCurrentLine(); diff --git a/app/tikzeditorhighlighter.h b/app/tikzeditorhighlighter.h index 99edee5..6db5ee3 100644 --- a/app/tikzeditorhighlighter.h +++ b/app/tikzeditorhighlighter.h @@ -52,7 +52,7 @@ class TikzHighlighter : public QSyntaxHighlighter /** Implements QSyntaxHighlighter::highlightBlock() * @see QSyntaxHighlighter::highlightBlock() */ - void highlightBlock(const QString &text); + void highlightBlock(const QString &text) override; private: /// All highlighting rules with their formatting for easy iteration diff --git a/app/tikzeditorview.h b/app/tikzeditorview.h index a6132de..097fba0 100644 --- a/app/tikzeditorview.h +++ b/app/tikzeditorview.h @@ -47,7 +47,7 @@ class TikzEditorView : public TikzEditorViewAbstract QPlainTextEdit *editor(); QTextDocument *document(); - QString text(); + QString text() override; #ifndef KTIKZ_USE_KDE QMenu *editMenu(); QMenu *bookmarksMenu(); @@ -56,11 +56,11 @@ class TikzEditorView : public TikzEditorViewAbstract void applySettings(); void setLine(const QString &line); int lineNumber() const; - void updateCompleter(bool useCompletion, const QStringList &words); - void clear(); - bool isEmpty(); - bool isModified(); - void setModified(bool value); + void updateCompleter(bool useCompletion, const QStringList &words) override; + void clear() override; + bool isEmpty() override; + bool isModified() override; + void setModified(bool value) override; public Q_SLOTS: void setPasteEnabled(); diff --git a/app/tikzktexteditorcompletion.h b/app/tikzktexteditorcompletion.h index 39213f9..623aaa6 100644 --- a/app/tikzktexteditorcompletion.h +++ b/app/tikzktexteditorcompletion.h @@ -47,16 +47,12 @@ class TikzKTextEditorCompletion : public KTextEditor::CodeCompletionModel, void updateCompleter(bool useCompletion, const QStringList &words); - // bool shouldStartCompletion(KTextEditor::View *view, const QString &insertedText, bool - // userInsertion, const KTextEditor::Cursor &position) Q_DECL_OVERRIDE; KTextEditor::Range completionRange(KTextEditor::View *view, - const KTextEditor::Cursor &position) Q_DECL_OVERRIDE; - // QString filterString(KTextEditor::View *view, const KTextEditor::Range &range, const - // KTextEditor::Cursor &position) Q_DECL_OVERRIDE; + const KTextEditor::Cursor &position) override; void completionInvoked(KTextEditor::View *view, const KTextEditor::Range &range, - KTextEditor::CodeCompletionModel::InvocationType it) Q_DECL_OVERRIDE; - QVariant data(const QModelIndex &index, int role) const Q_DECL_OVERRIDE; + KTextEditor::CodeCompletionModel::InvocationType it) override; + QVariant data(const QModelIndex &index, int role) const override; private: void findMatches(); diff --git a/app/tikzktexteditorview.h b/app/tikzktexteditorview.h index 043b9da..3cb01df 100644 --- a/app/tikzktexteditorview.h +++ b/app/tikzktexteditorview.h @@ -39,14 +39,14 @@ class TikzKTextEditorView : public TikzEditorViewAbstract KTextEditor::Document *editor(); KTextEditor::Document *document(); - QString text(); + QString text() override; KTextEditor::View *view(); - void updateCompleter(bool useCompletion, const QStringList &words); - void clear(); - bool isEmpty(); - bool isModified(); - void setModified(bool value); + void updateCompleter(bool useCompletion, const QStringList &words) override; + void clear() override; + bool isEmpty() override; + bool isModified() override; + void setModified(bool value) override; Q_SIGNALS: void documentUrlChanged(const QUrl &url); diff --git a/app/usercommandeditdialog.h b/app/usercommandeditdialog.h index 0453444..f2c33d2 100644 --- a/app/usercommandeditdialog.h +++ b/app/usercommandeditdialog.h @@ -33,7 +33,7 @@ class UserCommandEditDialog : public QDialog Ui::UserCommandEditDialog ui; public Q_SLOTS: - void accept(); + void accept() override; private Q_SLOTS: void readSettings(); diff --git a/common/templatewidget.h b/common/templatewidget.h index 6371716..b262d91 100644 --- a/common/templatewidget.h +++ b/common/templatewidget.h @@ -41,7 +41,7 @@ class TemplateWidget : public QWidget void focusEditor(); protected: - void keyPressEvent(QKeyEvent *event); + void keyPressEvent(QKeyEvent *event) override; private Q_SLOTS: void selectTemplateFile(); diff --git a/common/tikzpreview.h b/common/tikzpreview.h index 5a2d005..8e1d689 100644 --- a/common/tikzpreview.h +++ b/common/tikzpreview.h @@ -43,7 +43,7 @@ class TikzPreview : public QGraphicsView explicit TikzPreview(QWidget *parent = 0); ~TikzPreview(); - virtual QSize sizeHint() const; + virtual QSize sizeHint() const override; QList actions(); QToolBar *toolBar(); QImage renderToImage(double xres, double yres, int pageNumber); @@ -67,11 +67,11 @@ public Q_SLOTS: void generatePreview(Poppler::Document *tikzPdfDoc, qreal zoomFactor, int currentPage); protected: - void contextMenuEvent(QContextMenuEvent *event); - void paintEvent(QPaintEvent *event); - void wheelEvent(QWheelEvent *event); - void mouseMoveEvent(QMouseEvent *event); - void mousePressEvent(QMouseEvent *event); + void contextMenuEvent(QContextMenuEvent *event) override; + void paintEvent(QPaintEvent *event) override; + void wheelEvent(QWheelEvent *event) override; + void mouseMoveEvent(QMouseEvent *event) override; + void mousePressEvent(QMouseEvent *event) override; private Q_SLOTS: void setZoomFactor(qreal zoomFactor); diff --git a/common/tikzpreviewmessagewidget.h b/common/tikzpreviewmessagewidget.h index fe07cc3..50542ef 100644 --- a/common/tikzpreviewmessagewidget.h +++ b/common/tikzpreviewmessagewidget.h @@ -34,7 +34,7 @@ class TikzPreviewMessageWidget : public QFrame explicit TikzPreviewMessageWidget(QWidget *parent = 0); ~TikzPreviewMessageWidget(); - virtual QSize sizeHint() const; + virtual QSize sizeHint() const override; void setText(const QString &message, PixmapVisibility pixmapVisibility = PixmapNotVisible); private: diff --git a/common/utils/printpreviewdialog.h b/common/utils/printpreviewdialog.h index 5d19fd8..a9160d6 100644 --- a/common/utils/printpreviewdialog.h +++ b/common/utils/printpreviewdialog.h @@ -32,7 +32,7 @@ class PrintPreviewDialog : public QDialog public: explicit PrintPreviewDialog(QPrinter *printer, QWidget *parent = 0); - void setVisible(bool visible); + void setVisible(bool visible) override; Q_SIGNALS: void paintRequested(QPrinter *printer); diff --git a/part/part.h b/part/part.h index 04dd463..2960c78 100644 --- a/part/part.h +++ b/part/part.h @@ -43,17 +43,17 @@ class Part : public KParts::ReadOnlyPart, public MainWidget public: explicit Part(QWidget *parentWidget, QObject *parent, const QVariantList &args); - virtual ~Part() Q_DECL_OVERRIDE; + virtual ~Part() override; static KAboutData *createAboutData(); - virtual QWidget *widget(); - QString tikzCode() const; - QUrl url() const; + virtual QWidget *widget() override; + QString tikzCode() const override; + QUrl url() const override; protected: /** Reimplemented from KParts::PartBase. */ - bool openFile() Q_DECL_OVERRIDE; - bool closeUrl(); + bool openFile() override; + bool closeUrl() override; private slots: void showAboutDialog();