> And now clang++ 10 complains a lot...

And this patch should fix the rest.

Yuriy
From 3786af0ec675cab02d48581ac07f97090534e0f3 Mon Sep 17 00:00:00 2001
From: Yuriy Skalko <yuriy.ska...@gmail.com>
Date: Sun, 4 Oct 2020 17:56:53 +0300
Subject: [PATCH] Amend efc0877f

Add more `override` specifiers. Replace `throw()` to `noexcept`.
---
 src/Converter.h                        |  4 +-
 src/Encoding.h                         |  2 +-
 src/frontends/qt/CategorizedCombo.h    |  4 +-
 src/frontends/qt/CustomizedWidgets.h   |  2 +-
 src/frontends/qt/EmptyTable.h          |  4 +-
 src/frontends/qt/FancyLineEdit.h       |  6 +--
 src/frontends/qt/FindAndReplace.h      |  6 +--
 src/frontends/qt/GuiBranches.h         |  2 +-
 src/frontends/qt/GuiClipboard.h        | 22 ++++-----
 src/frontends/qt/GuiCommandEdit.h      |  2 +-
 src/frontends/qt/GuiCompleter.h        |  2 +-
 src/frontends/qt/GuiPrefs.h            | 68 +++++++++++++-------------
 src/frontends/qt/GuiProgress.h         | 26 +++++-----
 src/frontends/qt/GuiSelection.h        |  8 +--
 src/frontends/qt/GuiSelectionManager.h |  2 +-
 src/frontends/qt/GuiSetBorder.h        |  4 +-
 src/frontends/qt/GuiSpellchecker.h     |  2 +-
 src/frontends/qt/GuiToolbar.h          | 10 ++--
 src/frontends/qt/GuiView.h             | 24 ++++-----
 src/frontends/qt/GuiViewSource.h       |  2 +-
 src/frontends/qt/GuiWorkArea.h         | 42 ++++++++--------
 src/frontends/qt/IconPalette.h         | 10 ++--
 src/frontends/qt/InsertTableWidget.h   |  8 +--
 src/frontends/qt/LayoutBox.h           |  2 +-
 src/frontends/qt/PanelStack.h          |  2 +-
 src/frontends/qt/ToolTipFormatter.h    |  2 +-
 src/frontends/qt/Validator.h           | 10 ++--
 src/insets/InsetTabular.h              |  4 +-
 src/mathed/InsetMathRoot.h             |  2 +-
 src/mathed/MathCompletionList.h        |  8 +--
 src/support/ExceptionMessage.h         |  4 +-
 src/support/RefChanger.h               |  4 +-
 src/support/docstream.cpp              | 14 +++---
 src/support/docstream.h                |  4 +-
 src/support/docstring.cpp              | 18 +++----
 35 files changed, 168 insertions(+), 168 deletions(-)

diff --git a/src/Converter.h b/src/Converter.h
index fe95be6ed8..e9efa00f4f 100644
--- a/src/Converter.h
+++ b/src/Converter.h
@@ -33,8 +33,8 @@ class Formats;
 class ConversionException : public std::exception {
 public:
        ConversionException() {}
-       virtual ~ConversionException() throw() {}
-       virtual const char * what() const throw() 
+       virtual ~ConversionException() noexcept {}
+       const char * what() const noexcept override
                { return "Exception caught in conversion routine!"; }
 };
 
diff --git a/src/Encoding.h b/src/Encoding.h
index 6bd90c7b80..76b022dd9d 100644
--- a/src/Encoding.h
+++ b/src/Encoding.h
@@ -29,7 +29,7 @@ class EncodingException : public std::exception {
 public:
        EncodingException(char_type c);
        virtual ~EncodingException() noexcept {}
-       virtual const char * what() const noexcept;
+       virtual const char * what() const noexcept override;
 
        char_type failed_char;
        int par_id;
diff --git a/src/frontends/qt/CategorizedCombo.h 
b/src/frontends/qt/CategorizedCombo.h
index 3ce7da7883..be351ff993 100644
--- a/src/frontends/qt/CategorizedCombo.h
+++ b/src/frontends/qt/CategorizedCombo.h
@@ -57,10 +57,10 @@ public:
                                                    QString const & unavail = 
QString());
 
        ///
-       void showPopup();
+       void showPopup() override;
 
        ///
-       bool eventFilter(QObject * o, QEvent * e);
+       bool eventFilter(QObject * o, QEvent * e) override;
        ///
        QString const & filter() const;
 
diff --git a/src/frontends/qt/CustomizedWidgets.h 
b/src/frontends/qt/CustomizedWidgets.h
index 69373c21c1..ca68ca99cf 100644
--- a/src/frontends/qt/CustomizedWidgets.h
+++ b/src/frontends/qt/CustomizedWidgets.h
@@ -35,7 +35,7 @@ public:
        void setKeySequence(lyx::KeySequence const & s);
        void removeFromSequence();
 protected Q_SLOTS:
-       bool event(QEvent* e);
+       bool event(QEvent* e) override;
        void keyPressEvent(QKeyEvent * e) override;
 private:
        void appendToSequence(QKeyEvent * e);
diff --git a/src/frontends/qt/EmptyTable.h b/src/frontends/qt/EmptyTable.h
index 833676d9b9..99265266d2 100644
--- a/src/frontends/qt/EmptyTable.h
+++ b/src/frontends/qt/EmptyTable.h
@@ -29,7 +29,7 @@ class EmptyTable : public QTableWidget {
 public:
        EmptyTable(QWidget * parent = 0, int rows = 5, int columns = 5);
 
-       virtual QSize sizeHint() const;
+       QSize sizeHint() const override;
 public Q_SLOTS:
        /// set the number of columns in the table and emit colsChanged() signal
        void setNumberColumns(int nr_cols);
@@ -43,7 +43,7 @@ Q_SIGNALS:
 protected:
        /// fill in a cell
        virtual void paintCell(class QPainter *, int, int);
-       virtual void mouseMoveEvent(QMouseEvent *);
+       void mouseMoveEvent(QMouseEvent *) override;
 
        /// Reset all the cell size to default
        virtual void resetCellSize();
diff --git a/src/frontends/qt/FancyLineEdit.h b/src/frontends/qt/FancyLineEdit.h
index 470173effa..053ad1ce3e 100644
--- a/src/frontends/qt/FancyLineEdit.h
+++ b/src/frontends/qt/FancyLineEdit.h
@@ -30,7 +30,7 @@ class IconButton: public QAbstractButton
        Q_PROPERTY(QPixmap pixmap READ pixmap WRITE setPixmap)
 public:
        explicit IconButton(QWidget *parent = 0);
-       void paintEvent(QPaintEvent *event);
+       void paintEvent(QPaintEvent *event) override;
        void setPixmap(const QPixmap &pixmap) { m_pixmap = pixmap; update(); }
        QPixmap pixmap() const { return m_pixmap; }
        float iconOpacity() { return m_iconOpacity; }
@@ -96,8 +96,8 @@ private Q_SLOTS:
        void iconClicked();
 
 protected:
-       virtual void resizeEvent(QResizeEvent *e);
-       virtual void keyPressEvent(QKeyEvent *e) override;
+       void resizeEvent(QResizeEvent *e) override;
+       void keyPressEvent(QKeyEvent *e) override;
 
 private:
        void updateMargins();
diff --git a/src/frontends/qt/FindAndReplace.h 
b/src/frontends/qt/FindAndReplace.h
index d9c5f4ad28..4456c653a9 100644
--- a/src/frontends/qt/FindAndReplace.h
+++ b/src/frontends/qt/FindAndReplace.h
@@ -57,10 +57,10 @@ private:
                bool expandmacros, bool ignoreformat, bool replace,
                bool keep_case, bool replace_all = false);
 
-       bool eventFilter(QObject *obj, QEvent *event);
+       bool eventFilter(QObject *obj, QEvent *event) override;
 
-       void virtual showEvent(QShowEvent *ev);
-       void virtual hideEvent(QHideEvent *ev);
+       void virtual showEvent(QShowEvent *ev) override;
+       void virtual hideEvent(QHideEvent *ev) override;
 
        void hideDialog();
 
diff --git a/src/frontends/qt/GuiBranches.h b/src/frontends/qt/GuiBranches.h
index fc29167cd0..dd12649a1a 100644
--- a/src/frontends/qt/GuiBranches.h
+++ b/src/frontends/qt/GuiBranches.h
@@ -49,7 +49,7 @@ public:
        void apply(BufferParams & params) const;
        void setUnknownBranches(QStringList const & b) { unknown_branches_ = b; 
}
 
-       bool eventFilter(QObject * obj, QEvent * event);
+       bool eventFilter(QObject * obj, QEvent * event) override;
 
 Q_SIGNALS:
        void changed();
diff --git a/src/frontends/qt/GuiClipboard.h b/src/frontends/qt/GuiClipboard.h
index 3ff324cc5d..9e48b4ee07 100644
--- a/src/frontends/qt/GuiClipboard.h
+++ b/src/frontends/qt/GuiClipboard.h
@@ -45,7 +45,7 @@ public:
        /// reads the clipboard and updates the cached_formats_
        void update();
        /// returns the cached list of formats supported by the object
-       virtual QStringList formats() const { return cached_formats_; }
+       QStringList formats() const override { return cached_formats_; }
        /// reads the clipboard and returns the data
        QByteArray data(QString const & mimeType) const;
 
@@ -67,16 +67,16 @@ public:
        /** Clipboard overloaded methods
         */
        //@{
-       std::string const getAsLyX() const;
-       support::FileName getAsGraphics(Cursor const & cur, GraphicsType type) 
const;
-       docstring const getAsText(TextType type) const;
-       void put(std::string const & text) const;
-       void put(std::string const & lyx, docstring const & html, docstring 
const & text);
-       bool hasGraphicsContents(GraphicsType type = AnyGraphicsType) const;
-       bool hasTextContents(TextType typetype = AnyTextType) const;
-       bool isInternal() const;
-       bool hasInternal() const;
-       bool empty() const;
+       std::string const getAsLyX() const override;
+       support::FileName getAsGraphics(Cursor const & cur, GraphicsType type) 
const override;
+       docstring const getAsText(TextType type) const override;
+       void put(std::string const & text) const override;
+       void put(std::string const & lyx, docstring const & html, docstring 
const & text) override;
+       bool hasGraphicsContents(GraphicsType type = AnyGraphicsType) const 
override;
+       bool hasTextContents(TextType typetype = AnyTextType) const override;
+       bool isInternal() const override;
+       bool hasInternal() const override;
+       bool empty() const override;
        //@}
 
        support::FileName getPastedGraphicsFileName(Cursor const & cur,
diff --git a/src/frontends/qt/GuiCommandEdit.h 
b/src/frontends/qt/GuiCommandEdit.h
index 82a546a3dd..bddd532e8f 100644
--- a/src/frontends/qt/GuiCommandEdit.h
+++ b/src/frontends/qt/GuiCommandEdit.h
@@ -38,7 +38,7 @@ Q_SIGNALS:
 
 protected:
        ///
-       virtual bool event(QEvent * e);
+       virtual bool event(QEvent * e) override;
        ///
        virtual void keyPressEvent(QKeyEvent * e) override;
 };
diff --git a/src/frontends/qt/GuiCompleter.h b/src/frontends/qt/GuiCompleter.h
index ea22cadd1e..54ea5f0559 100644
--- a/src/frontends/qt/GuiCompleter.h
+++ b/src/frontends/qt/GuiCompleter.h
@@ -110,7 +110,7 @@ private:
        ///
        void updateModel(Cursor const & cur, bool popupUpdate, bool 
inlineUpdate);
        ///
-       bool eventFilter(QObject * watched, QEvent * event);
+       bool eventFilter(QObject * watched, QEvent * event) override;
 
        ///
        GuiWorkArea * gui_;
diff --git a/src/frontends/qt/GuiPrefs.h b/src/frontends/qt/GuiPrefs.h
index a9ea86a6fa..cb810c57f7 100644
--- a/src/frontends/qt/GuiPrefs.h
+++ b/src/frontends/qt/GuiPrefs.h
@@ -161,8 +161,8 @@ class PrefOutput : public PrefModule, public 
Ui::PrefOutputUi
 public:
        PrefOutput(GuiPreferences * form);
 
-       virtual void applyRC(LyXRC & rc) const;
-       virtual void updateRC(LyXRC const & rc);
+       void applyRC(LyXRC & rc) const override;
+       void updateRC(LyXRC const & rc) override;
 };
 
 
@@ -172,8 +172,8 @@ class PrefInput : public PrefModule, public Ui::PrefInputUi
 public:
        PrefInput(GuiPreferences * form);
 
-       virtual void applyRC(LyXRC & rc) const;
-       virtual void updateRC(LyXRC const & rc);
+       void applyRC(LyXRC & rc) const override;
+       void updateRC(LyXRC const & rc) override;
 
 private Q_SLOTS:
        void on_firstKeymapPB_clicked(bool);
@@ -192,8 +192,8 @@ class PrefCompletion : public PrefModule, public 
Ui::PrefCompletionUi
 public:
        PrefCompletion(GuiPreferences * form);
 
-       virtual void applyRC(LyXRC & rc) const;
-       virtual void updateRC(LyXRC const & rc);
+       void applyRC(LyXRC & rc) const override;
+       void updateRC(LyXRC const & rc) override;
        virtual void enableCB();
 private Q_SLOTS:
        void on_popupTextCB_clicked();
@@ -207,8 +207,8 @@ class PrefLatex : public PrefModule, public Ui::PrefLatexUi
 public:
        PrefLatex(GuiPreferences * form);
 
-       virtual void applyRC(LyXRC & rc) const;
-       virtual void updateRC(LyXRC const & rc);
+       void applyRC(LyXRC & rc) const override;
+       void updateRC(LyXRC const & rc) override;
 
 private Q_SLOTS:
        void on_latexBibtexCO_activated(int n);
@@ -231,8 +231,8 @@ class PrefScreenFonts : public PrefModule, public 
Ui::PrefScreenFontsUi
 public:
        PrefScreenFonts(GuiPreferences * form);
 
-       virtual void applyRC(LyXRC & rc) const;
-       virtual void updateRC(LyXRC const & rc);
+       void applyRC(LyXRC & rc) const override;
+       void updateRC(LyXRC const & rc) override;
 
 private Q_SLOTS:
        void selectRoman(const QString&);
@@ -250,8 +250,8 @@ class PrefColors : public PrefModule, public 
Ui::PrefColorsUi
 public:
        PrefColors(GuiPreferences * form);
 
-       void applyRC(LyXRC & rc) const;
-       void updateRC(LyXRC const & rc);
+       void applyRC(LyXRC & rc) const override;
+       void updateRC(LyXRC const & rc) override;
 
 private Q_SLOTS:
        void changeColor();
@@ -282,8 +282,8 @@ class PrefDisplay : public PrefModule, public 
Ui::PrefDisplayUi
 public:
        PrefDisplay(GuiPreferences * form);
 
-       void applyRC(LyXRC & rc) const;
-       void updateRC(LyXRC const & rc);
+       void applyRC(LyXRC & rc) const override;
+       void updateRC(LyXRC const & rc) override;
 
 private Q_SLOTS:
        void on_instantPreviewCO_currentIndexChanged(int);
@@ -296,8 +296,8 @@ class PrefPaths : public PrefModule, public Ui::PrefPathsUi
 public:
        PrefPaths(GuiPreferences * form);
 
-       void applyRC(LyXRC & rc) const;
-       void updateRC(LyXRC const & rc);
+       void applyRC(LyXRC & rc) const override;
+       void updateRC(LyXRC const & rc) override;
 
 private Q_SLOTS:
        void selectExampledir();
@@ -318,8 +318,8 @@ class PrefSpellchecker : public PrefModule, public 
Ui::PrefSpellcheckerUi
 public:
        PrefSpellchecker(GuiPreferences * form);
 
-       void applyRC(LyXRC & rc) const;
-       void updateRC(LyXRC const & rc);
+       void applyRC(LyXRC & rc) const override;
+       void updateRC(LyXRC const & rc) override;
 
 private Q_SLOTS:
        void on_spellcheckerCB_currentIndexChanged(int);
@@ -332,8 +332,8 @@ class PrefConverters : public PrefModule, public 
Ui::PrefConvertersUi
 public:
        PrefConverters(GuiPreferences * form);
 
-       void applyRC(LyXRC & rc) const;
-       void updateRC(LyXRC const & rc);
+       void applyRC(LyXRC & rc) const override;
+       void updateRC(LyXRC const & rc) override;
 
 public Q_SLOTS:
        void updateGui();
@@ -358,8 +358,8 @@ class PrefFileformats : public PrefModule, public 
Ui::PrefFileformatsUi
 public:
        PrefFileformats(GuiPreferences * form);
 
-       void applyRC(LyXRC & rc) const;
-       void updateRC(LyXRC const & rc);
+       void applyRC(LyXRC & rc) const override;
+       void updateRC(LyXRC const & rc) override;
        void updateView();
 
 Q_SIGNALS:
@@ -402,8 +402,8 @@ class PrefLanguage : public PrefModule, public 
Ui::PrefLanguageUi
 public:
        PrefLanguage(GuiPreferences * form);
 
-       void applyRC(LyXRC & rc) const;
-       void updateRC(LyXRC const & rc);
+       void applyRC(LyXRC & rc) const override;
+       void updateRC(LyXRC const & rc) override;
 
 private Q_SLOTS:
        void on_uiLanguageCO_currentIndexChanged(int);
@@ -421,8 +421,8 @@ class PrefUserInterface : public PrefModule, public 
Ui::PrefUi
 public:
        PrefUserInterface(GuiPreferences * form);
 
-       void applyRC(LyXRC & rc) const;
-       void updateRC(LyXRC const & rc);
+       void applyRC(LyXRC & rc) const override;
+       void updateRC(LyXRC const & rc) override;
 
 public Q_SLOTS:
        void selectUi();
@@ -435,8 +435,8 @@ class PrefDocHandling : public PrefModule, public 
Ui::PrefDocHandlingUi
 public:
        PrefDocHandling(GuiPreferences * form);
 
-       void applyRC(LyXRC & rc) const;
-       void updateRC(LyXRC const & rc);
+       void applyRC(LyXRC & rc) const override;
+       void updateRC(LyXRC const & rc) override;
 
 public Q_SLOTS:
        void on_clearSessionPB_clicked();
@@ -450,8 +450,8 @@ class PrefEdit : public PrefModule, public Ui::PrefEditUi
 public:
        PrefEdit(GuiPreferences * form);
 
-       void applyRC(LyXRC & rc) const;
-       void updateRC(LyXRC const & rc);
+       void applyRC(LyXRC & rc) const override;
+       void updateRC(LyXRC const & rc) override;
 
 public Q_SLOTS:
        void on_fullscreenLimitCB_toggled(bool);
@@ -473,8 +473,8 @@ class PrefShortcuts : public PrefModule, public 
Ui::PrefShortcuts
 public:
        PrefShortcuts(GuiPreferences * form);
 
-       void applyRC(LyXRC & rc) const;
-       void updateRC(LyXRC const & rc);
+       void applyRC(LyXRC & rc) const override;
+       void updateRC(LyXRC const & rc) override;
        void updateShortcutsTW();
 
 public Q_SLOTS:
@@ -551,8 +551,8 @@ class PrefIdentity : public PrefModule, public 
Ui::PrefIdentityUi
 public:
        PrefIdentity(GuiPreferences * form);
 
-       void applyRC(LyXRC & rc) const;
-       void updateRC(LyXRC const & rc);
+       void applyRC(LyXRC & rc) const override;
+       void updateRC(LyXRC const & rc) override;
 };
 
 
diff --git a/src/frontends/qt/GuiProgress.h b/src/frontends/qt/GuiProgress.h
index 80ab47a558..fc762db1ae 100644
--- a/src/frontends/qt/GuiProgress.h
+++ b/src/frontends/qt/GuiProgress.h
@@ -34,24 +34,24 @@ public:
        GuiProgress();
        ~GuiProgress();
 
-       void lyxerrConnect();
-       void lyxerrDisconnect();
-       void lyxerrFlush();
+       void lyxerrConnect() override;
+       void lyxerrDisconnect() override;
+       void lyxerrFlush() override;
 
        int prompt(docstring const & title, docstring const & question,
                   int default_button, int cancel_button,
-                  docstring const & b1, docstring const & b2);
+                  docstring const & b1, docstring const & b2) override;
 
        static QString currentTime();
 
 Q_SIGNALS:
 
        // ProgressInterface
-       void processStarted(QString const &);
-       void processFinished(QString const &);
-       void appendMessage(QString const &);
-       void appendError(QString const &);
-       void clearMessages();
+       void processStarted(QString const &) override;
+       void processFinished(QString const &) override;
+       void appendMessage(QString const &) override;
+       void appendError(QString const &) override;
+       void clearMessages() override;
        void appendLyXErrMessage(QString const & text);
 
 
@@ -60,10 +60,10 @@ Q_SIGNALS:
        void triggerFlush();
 
        // Alert interface
-       void warning(QString const & title, QString const & message);
-       void toggleWarning(QString const & title, QString const & msg, QString 
const & formatted);
-       void error(QString const & title, QString const & message, QString 
const & details = QString());
-       void information(QString const & title, QString const & message);
+       void warning(QString const & title, QString const & message) override;
+       void toggleWarning(QString const & title, QString const & msg, QString 
const & formatted) override;
+       void error(QString const & title, QString const & message, QString 
const & details = QString()) override;
+       void information(QString const & title, QString const & message) 
override;
 
 private Q_SLOTS:
        void doProcessStarted(QString const &);
diff --git a/src/frontends/qt/GuiSelection.h b/src/frontends/qt/GuiSelection.h
index 95fac18cb7..57515cc0bc 100644
--- a/src/frontends/qt/GuiSelection.h
+++ b/src/frontends/qt/GuiSelection.h
@@ -34,10 +34,10 @@ public:
        /** Selection overloaded methods
         */
        //@{
-       void haveSelection(bool own);
-       docstring const get() const;
-       void put(docstring const & str);
-       bool empty() const;
+       void haveSelection(bool own) override;
+       docstring const get() const override;
+       void put(docstring const & str) override;
+       bool empty() const override;
        //@}
 
 private Q_SLOTS:
diff --git a/src/frontends/qt/GuiSelectionManager.h 
b/src/frontends/qt/GuiSelectionManager.h
index 4076991dfd..7a7d71d7e7 100644
--- a/src/frontends/qt/GuiSelectionManager.h
+++ b/src/frontends/qt/GuiSelectionManager.h
@@ -133,7 +133,7 @@ protected Q_SLOTS:
        ///
        void availableLV_doubleClicked(const QModelIndex &);
        ///
-       bool eventFilter(QObject *, QEvent *);
+       bool eventFilter(QObject *, QEvent *) override;
        ///
        void updateButtons();
 
diff --git a/src/frontends/qt/GuiSetBorder.h b/src/frontends/qt/GuiSetBorder.h
index bb73ccb155..5e444743c7 100644
--- a/src/frontends/qt/GuiSetBorder.h
+++ b/src/frontends/qt/GuiSetBorder.h
@@ -97,8 +97,8 @@ public Q_SLOTS:
        void setAll(BorderState);
 
 protected:
-       void mousePressEvent(QMouseEvent * e);
-       void paintEvent(QPaintEvent * e);
+       void mousePressEvent(QMouseEvent * e) override;
+       void paintEvent(QPaintEvent * e) override;
 
 private:
        void init();
diff --git a/src/frontends/qt/GuiSpellchecker.h 
b/src/frontends/qt/GuiSpellchecker.h
index 5792f02cf6..79c70880f0 100644
--- a/src/frontends/qt/GuiSpellchecker.h
+++ b/src/frontends/qt/GuiSpellchecker.h
@@ -51,7 +51,7 @@ private Q_SLOTS:
 
 private:
        ///
-       bool eventFilter(QObject *obj, QEvent *event);
+       bool eventFilter(QObject *obj, QEvent *event) override;
        struct Private;
        Private * const d;
 };
diff --git a/src/frontends/qt/GuiToolbar.h b/src/frontends/qt/GuiToolbar.h
index 668b3f04d3..8f4d4d927f 100644
--- a/src/frontends/qt/GuiToolbar.h
+++ b/src/frontends/qt/GuiToolbar.h
@@ -73,11 +73,11 @@ public:
 
 protected:
        ///
-       void initialize();
+       void initialize() override;
 
 protected Q_SLOTS:
        ///
-       void updateTriggered();
+       void updateTriggered() override;
 };
 
 
@@ -103,7 +103,7 @@ public:
        static bool isMenuType(std::string const & s);
 protected:
        ///
-       void initialize();
+       void initialize() override;
        ///
        void loadFlexInsets();
        /// pimpl so we don't have to include big files
@@ -111,7 +111,7 @@ protected:
        Private * d;
 protected Q_SLOTS:
        ///
-       void updateTriggered();
+       void updateTriggered() override;
 };
 
 
@@ -124,7 +124,7 @@ public:
 
        /// Reimplemented from QToolbar to detect whether the
        /// toolbar is restored with MainWindow::restoreState().
-       void setVisible(bool visible);
+       void setVisible(bool visible) override;
 
        ///
        void setVisibility(int visibility);
diff --git a/src/frontends/qt/GuiView.h b/src/frontends/qt/GuiView.h
index 4ec639d71d..6bf5ba3208 100644
--- a/src/frontends/qt/GuiView.h
+++ b/src/frontends/qt/GuiView.h
@@ -110,7 +110,7 @@ public:
 
        /// display a message in the view
        /// could be called from any thread
-       void message(docstring const &);
+       void message(docstring const &) override;
 
        bool getStatus(FuncRequest const & cmd, FuncStatus & flag);
        /// dispatch command.
@@ -130,7 +130,7 @@ public:
        bool hasFocus() const;
 
        ///
-       void focusInEvent(QFocusEvent * e);
+       void focusInEvent(QFocusEvent * e) override;
        /// Add a Buffer to the View
        /// \param b Buffer to set.
        /// \param switch_to Whether to set it to the current workarea.
@@ -166,12 +166,12 @@ public:
 
        /// \name GuiBufferDelegate.
        //@{
-       void resetAutosaveTimers();
+       void resetAutosaveTimers() override;
        // shows an error list
        // if from_master is true, show master's error list
-       void errors(std::string const &, bool from_master = false);
-       void structureChanged();
-       void updateTocItem(std::string const &, DocIterator const &);
+       void errors(std::string const &, bool from_master = false) override;
+       void structureChanged() override;
+       void updateTocItem(std::string const &, DocIterator const &) override;
        //@}
 
        ///
@@ -282,17 +282,17 @@ private:
        /// disconnect from signals in the given buffer
        void disconnectBuffer();
        ///
-       void dragEnterEvent(QDragEnterEvent * ev);
+       void dragEnterEvent(QDragEnterEvent * ev) override;
        ///
-       void dropEvent(QDropEvent * ev);
+       void dropEvent(QDropEvent * ev) override;
        /// make sure we quit cleanly
        void closeEvent(QCloseEvent * e) override;
        ///
        void showEvent(QShowEvent *) override;
 
        /// in order to catch Tab key press.
-       bool event(QEvent * e);
-       bool focusNextPrevChild(bool);
+       bool event(QEvent * e) override;
+       bool focusNextPrevChild(bool) override;
 
        ///
        bool goToFileRow(std::string const & argument);
@@ -338,13 +338,13 @@ public:
            the current cursor position or modify an existing, 'open' inset?
        */
        void showDialog(std::string const & name,
-               std::string const & data, Inset * inset = 0);
+               std::string const & data, Inset * inset = 0) override;
 
        /** \param name == "citation", "bibtex" etc; an identifier used
            to reset the contents of a particular dialog with \param data.
            See the comments to 'show', above.
        */
-       void updateDialog(std::string const & name, std::string const & data);
+       void updateDialog(std::string const & name, std::string const & data) 
override;
 
        /** All Dialogs of the given \param name will be closed if they are
            connected to the given \param inset.
diff --git a/src/frontends/qt/GuiViewSource.h b/src/frontends/qt/GuiViewSource.h
index cd589a8308..47221c93f6 100644
--- a/src/frontends/qt/GuiViewSource.h
+++ b/src/frontends/qt/GuiViewSource.h
@@ -79,7 +79,7 @@ private:
        void getContent(BufferView const & view, Buffer::OutputWhat output,
                           docstring & str, std::string const & format, bool 
master);
        /// Grab double clicks on the viewport
-       bool eventFilter(QObject * obj, QEvent * event);
+       bool eventFilter(QObject * obj, QEvent * event) override;
        ///
        QTextDocument * document_;
        /// LaTeX syntax highlighter
diff --git a/src/frontends/qt/GuiWorkArea.h b/src/frontends/qt/GuiWorkArea.h
index 1d5696c17c..d64dfe85ce 100644
--- a/src/frontends/qt/GuiWorkArea.h
+++ b/src/frontends/qt/GuiWorkArea.h
@@ -64,7 +64,7 @@ public:
        ///
        BufferView const & bufferView() const;
        ///
-       void scheduleRedraw(bool update_metrics);
+       void scheduleRedraw(bool update_metrics) override;
 
        /// return true if the key is part of a shortcut
        bool queryKeySym(KeySymbol const & key, KeyModifier mod) const;
@@ -114,42 +114,42 @@ private Q_SLOTS:
        void toggleCaret();
        /// close this work area.
        /// Slot for Buffer::closing signal.
-       void close();
+       void close() override;
        /// Slot to restore proper scrollbar behaviour.
        void fixVerticalScrollBar();
 
 private:
        /// Update window titles of all users.
-       void updateWindowTitle();
+       void updateWindowTitle() override;
        ///
-       bool event(QEvent *);
+       bool event(QEvent *) override;
        ///
-       void contextMenuEvent(QContextMenuEvent *);
+       void contextMenuEvent(QContextMenuEvent *) override;
        ///
-       void focusInEvent(QFocusEvent *);
+       void focusInEvent(QFocusEvent *) override;
        ///
-       void focusOutEvent(QFocusEvent *);
+       void focusOutEvent(QFocusEvent *) override;
        /// repaint part of the widget
-       void paintEvent(QPaintEvent * ev);
+       void paintEvent(QPaintEvent * ev) override;
        /// widget has been resized
-       void resizeEvent(QResizeEvent * ev);
+       void resizeEvent(QResizeEvent * ev) override;
        /// mouse button press
-       void mousePressEvent(QMouseEvent * ev);
+       void mousePressEvent(QMouseEvent * ev) override;
        /// mouse button release
-       void mouseReleaseEvent(QMouseEvent * ev);
+       void mouseReleaseEvent(QMouseEvent * ev) override;
        /// mouse double click of button
-       void mouseDoubleClickEvent(QMouseEvent * ev);
+       void mouseDoubleClickEvent(QMouseEvent * ev) override;
        /// mouse motion
-       void mouseMoveEvent(QMouseEvent * ev);
+       void mouseMoveEvent(QMouseEvent * ev) override;
        /// wheel event
-       void wheelEvent(QWheelEvent * ev);
+       void wheelEvent(QWheelEvent * ev) override;
        /// key press event. It also knows how to handle ShortcutOverride 
events to
        /// avoid code duplication.
        void keyPressEvent(QKeyEvent * ev) override;
        /// IM events
-       void inputMethodEvent(QInputMethodEvent * ev);
+       void inputMethodEvent(QInputMethodEvent * ev) override;
        /// IM query
-       QVariant inputMethodQuery(Qt::InputMethodQuery query) const;
+       QVariant inputMethodQuery(Qt::InputMethodQuery query) const override;
 
        /// The slot connected to SyntheticMouseEvent::timeout.
        void generateSyntheticMouseEvent();
@@ -189,7 +189,7 @@ public:
        void setWidgetResizable(bool) {}
        void setWidget(QWidget *) {}
 
-       QSize sizeHint () const;
+       QSize sizeHint () const override;
        ///
        void disable();
 
@@ -228,7 +228,7 @@ public:
        GuiWorkArea * currentWorkArea() const;
        GuiWorkArea * workArea(Buffer & buffer) const;
        GuiWorkArea * workArea(int index) const;
-       void paintEvent(QPaintEvent *);
+       void paintEvent(QPaintEvent *) override;
 
 Q_SIGNALS:
        ///
@@ -254,10 +254,10 @@ private Q_SLOTS:
        ///
        void showContextMenu(const QPoint & pos);
        /// enable closing tab on middle-click
-       void mousePressEvent(QMouseEvent * me);
-       void mouseReleaseEvent(QMouseEvent * me);
+       void mousePressEvent(QMouseEvent * me) override;
+       void mouseReleaseEvent(QMouseEvent * me) override;
        ///
-       void mouseDoubleClickEvent(QMouseEvent * event);
+       void mouseDoubleClickEvent(QMouseEvent * event) override;
        ///
        int indexOfWorkArea(GuiWorkArea * w) const;
 
diff --git a/src/frontends/qt/IconPalette.h b/src/frontends/qt/IconPalette.h
index b65c7218d6..5e78ff6698 100644
--- a/src/frontends/qt/IconPalette.h
+++ b/src/frontends/qt/IconPalette.h
@@ -27,13 +27,13 @@ class TearOff : public QWidget {
        Q_OBJECT
 public:
        TearOff(QWidget * parent);
-       void enterEvent(QEvent *);
-       void leaveEvent(QEvent *);
-       void mouseReleaseEvent (QMouseEvent *);
+       void enterEvent(QEvent *) override;
+       void leaveEvent(QEvent *) override;
+       void mouseReleaseEvent (QMouseEvent *) override;
 Q_SIGNALS:
        void tearOff();
 protected:
-       void paintEvent(QPaintEvent *);
+       void paintEvent(QPaintEvent *) override;
 private:
        bool highlighted_;
 };
@@ -55,7 +55,7 @@ Q_SIGNALS:
 protected:
        void showEvent(QShowEvent * event) override;
        void hideEvent(QHideEvent * event) override;
-       void paintEvent(QPaintEvent * event);
+       void paintEvent(QPaintEvent * event) override;
 
 private Q_SLOTS:
        void tearOff();
diff --git a/src/frontends/qt/InsertTableWidget.h 
b/src/frontends/qt/InsertTableWidget.h
index f38d3dbe9b..78e24979c6 100644
--- a/src/frontends/qt/InsertTableWidget.h
+++ b/src/frontends/qt/InsertTableWidget.h
@@ -37,10 +37,10 @@ public Q_SLOTS:
        void updateParent();
 
 protected Q_SLOTS:
-       void mouseMoveEvent(QMouseEvent *);
-       void mouseReleaseEvent(QMouseEvent *);
-       void mousePressEvent(QMouseEvent *);
-       void paintEvent(QPaintEvent *);
+       void mouseMoveEvent(QMouseEvent *) override;
+       void mouseReleaseEvent(QMouseEvent *) override;
+       void mousePressEvent(QMouseEvent *) override;
+       void paintEvent(QPaintEvent *) override;
 
 private:
        //! update the geometry
diff --git a/src/frontends/qt/LayoutBox.h b/src/frontends/qt/LayoutBox.h
index ac8c86e0f1..7b7828ab41 100644
--- a/src/frontends/qt/LayoutBox.h
+++ b/src/frontends/qt/LayoutBox.h
@@ -49,7 +49,7 @@ public:
        void showPopup();
 
        ///
-       bool eventFilter(QObject * o, QEvent * e);
+       bool eventFilter(QObject * o, QEvent * e) override;
        ///
        QString const & filter() const;
 
diff --git a/src/frontends/qt/PanelStack.h b/src/frontends/qt/PanelStack.h
index 47d9906026..5c470aae21 100644
--- a/src/frontends/qt/PanelStack.h
+++ b/src/frontends/qt/PanelStack.h
@@ -50,7 +50,7 @@ public:
        ///
        bool isCurrentPanel(QString const & name) const;
        ///
-       QSize sizeHint() const;
+       QSize sizeHint() const override;
 
 public Q_SLOTS:
        /// the option filter changed
diff --git a/src/frontends/qt/ToolTipFormatter.h 
b/src/frontends/qt/ToolTipFormatter.h
index 7b943ff83e..d301148a93 100644
--- a/src/frontends/qt/ToolTipFormatter.h
+++ b/src/frontends/qt/ToolTipFormatter.h
@@ -27,7 +27,7 @@ class ToolTipFormatter : public QObject {
 public:
        ToolTipFormatter(QObject * parent);
 protected:
-       bool eventFilter(QObject * o, QEvent * e);
+       bool eventFilter(QObject * o, QEvent * e) override;
 };
 
 
diff --git a/src/frontends/qt/Validator.h b/src/frontends/qt/Validator.h
index cce7cf5f75..72d08ae3a9 100644
--- a/src/frontends/qt/Validator.h
+++ b/src/frontends/qt/Validator.h
@@ -54,7 +54,7 @@ public:
        /** @returns QValidator::Acceptable if @c data is a GlueLength.
         *  If not, returns QValidator::Intermediate.
         */
-       QValidator::State validate(QString & data, int &) const;
+       QValidator::State validate(QString & data, int &) const override;
 
        /** @name Bottom
         *  Set and retrieve the minimum allowed Length value.
@@ -98,7 +98,7 @@ public:
        /** @returns QValidator::Acceptable if @c data is a GlueLength
                * or is "auto". If not, returns QValidator::Intermediate.
         */
-       QValidator::State validate(QString & data, int &) const;
+       QValidator::State validate(QString & data, int &) const override;
 
 private:
        QString autotext_;
@@ -120,7 +120,7 @@ public:
        DoubleAutoValidator(QWidget * parent, QString const & autotext);
        DoubleAutoValidator(double bottom, double top, int decimals,
                QObject * parent);
-       QValidator::State validate(QString & input, int & pos) const;
+       QValidator::State validate(QString & input, int & pos) const override;
 
 private:
        QString autotext_;
@@ -135,7 +135,7 @@ public:
        // Define a validator.
        NoNewLineValidator(QWidget *);
        // Remove newline characters from input.
-       QValidator::State validate(QString &, int &) const;
+       QValidator::State validate(QString &, int &) const override;
 };
 
 
@@ -157,7 +157,7 @@ public:
        /** @returns QValidator::Acceptable if @c data is a valid path.
         *  If not, returns QValidator::Intermediate.
         */
-       QValidator::State validate(QString &, int &) const;
+       QValidator::State validate(QString &, int &) const override;
 
        /** Define what checks that @c validate() will perform.
         *  @param doc_type checks are activated only for @c LATEX docs.
diff --git a/src/insets/InsetTabular.h b/src/insets/InsetTabular.h
index 9786900fd9..30bc299301 100644
--- a/src/insets/InsetTabular.h
+++ b/src/insets/InsetTabular.h
@@ -1032,9 +1032,9 @@ public:
        // this should return true if we have a "normal" cell, otherwise false.
        // "normal" means without width set!
        /// should all paragraphs be output with "Standard" layout?
-       virtual bool allowParagraphCustomization(idx_type cell = 0) const 
override;
+       bool allowParagraphCustomization(idx_type cell = 0) const override;
        ///
-       virtual bool forcePlainLayout(idx_type cell = 0) const override;
+       bool forcePlainLayout(idx_type cell = 0) const override;
        ///
        void addPreview(DocIterator const & inset_pos,
                graphics::PreviewLoader &) const override;
diff --git a/src/mathed/InsetMathRoot.h b/src/mathed/InsetMathRoot.h
index 5fb9d59b72..253d0e7164 100644
--- a/src/mathed/InsetMathRoot.h
+++ b/src/mathed/InsetMathRoot.h
@@ -27,7 +27,7 @@ public:
        ///
        bool idxUpDown(Cursor & cur, bool up) const override;
        ///
-       bool idxForward(Cursor & cur) const;
+       bool idxForward(Cursor & cur) const override;
        ///
        bool idxBackward(Cursor & cur) const override;
        ///
diff --git a/src/mathed/MathCompletionList.h b/src/mathed/MathCompletionList.h
index 5131f87e1f..87e412164f 100644
--- a/src/mathed/MathCompletionList.h
+++ b/src/mathed/MathCompletionList.h
@@ -29,13 +29,13 @@ public:
        virtual ~MathCompletionList();
 
        ///
-       virtual bool sorted() const { return false; }
+       bool sorted() const override { return false; }
        ///
-       virtual size_t size() const;
+       size_t size() const override;
        ///
-       virtual docstring const & data(size_t idx) const;
+       docstring const & data(size_t idx) const override;
        ///
-       virtual std::string icon(size_t idx) const;
+       std::string icon(size_t idx) const override;
 
        ///
        static void addToFavorites(docstring const & completion);
diff --git a/src/support/ExceptionMessage.h b/src/support/ExceptionMessage.h
index 0bf59e58a2..c1fe8b40d8 100644
--- a/src/support/ExceptionMessage.h
+++ b/src/support/ExceptionMessage.h
@@ -50,8 +50,8 @@ public:
        : type_(type), title_(title), details_(details),
          message_(to_utf8(title_ + docstring::value_type('\n') + details_)) {}
 
-       virtual const char * what() const throw() { return message_.c_str(); }
-       virtual ~ExceptionMessage() throw() {}
+       const char * what() const noexcept override { return message_.c_str(); }
+       virtual ~ExceptionMessage() noexcept {}
 
        ExceptionType type_;
        docstring title_;
diff --git a/src/support/RefChanger.h b/src/support/RefChanger.h
index c279e4764a..ae35cc3891 100644
--- a/src/support/RefChanger.h
+++ b/src/support/RefChanger.h
@@ -35,9 +35,9 @@ public:
        //
        ~RevertibleRef() { revert(); }
        //
-       void revert() { if (enabled) { enabled = false; ref = old; } }
+       void revert() override { if (enabled) { enabled = false; ref = old; } }
        //
-       void keep() { enabled = false; }
+       void keep() override { enabled = false; }
        //
        X & ref;
        X const old;
diff --git a/src/support/docstream.cpp b/src/support/docstream.cpp
index df41c31f38..98324d1b25 100644
--- a/src/support/docstream.cpp
+++ b/src/support/docstream.cpp
@@ -236,11 +236,11 @@ protected:
                }
                return retval;
        }
-       int do_encoding() const throw() override
+       int do_encoding() const noexcept override
        {
                return 0;
        }
-       bool do_always_noconv() const throw() override
+       bool do_always_noconv() const noexcept override
        {
                return false;
        }
@@ -266,7 +266,7 @@ protected:
                return min(length, max);
 #endif
        }
-       int do_max_length() const throw() override
+       int do_max_length() const noexcept override
        {
                return lyx::max_encoded_bytes(encoding_);
        }
@@ -322,7 +322,7 @@ void setEncoding(Ios & ios, string const & encoding, 
ios_base::openmode mode)
 }
 
 
-const char * iconv_codecvt_facet_exception::what() const throw()
+const char * iconv_codecvt_facet_exception::what() const noexcept
 {
        return "iconv problem in iconv_codecvt_facet initialization";
 }
@@ -483,14 +483,14 @@ codecvt<lyx::char_type, char, mbstate_t>::do_in(
 
 
 template<>
-int codecvt<lyx::char_type, char, mbstate_t>::do_encoding() const throw()
+int codecvt<lyx::char_type, char, mbstate_t>::do_encoding() const noexcept
 {
        return 0;
 }
 
 
 template<>
-bool codecvt<lyx::char_type, char, mbstate_t>::do_always_noconv() const throw()
+bool codecvt<lyx::char_type, char, mbstate_t>::do_always_noconv() const 
noexcept
 {
        return true;
 }
@@ -503,7 +503,7 @@ int codecvt<lyx::char_type, char, mbstate_t>::do_length(
 }
 
 template<>
-int codecvt<lyx::char_type, char, mbstate_t>::do_max_length() const throw()
+int codecvt<lyx::char_type, char, mbstate_t>::do_max_length() const noexcept
 {
        return 4;
 }
diff --git a/src/support/docstream.h b/src/support/docstream.h
index 409c7557a8..52cc04ae6b 100644
--- a/src/support/docstream.h
+++ b/src/support/docstream.h
@@ -21,8 +21,8 @@ namespace lyx {
 
 class iconv_codecvt_facet_exception : public std::exception {
 public:
-       virtual ~iconv_codecvt_facet_exception() throw() {}
-       virtual const char * what() const throw();
+       virtual ~iconv_codecvt_facet_exception() noexcept {}
+       const char * what() const noexcept override;
 };
 
 /// Base class for UCS4 input streams
diff --git a/src/support/docstring.cpp b/src/support/docstring.cpp
index 57d28e719e..cbee18a20a 100644
--- a/src/support/docstring.cpp
+++ b/src/support/docstring.cpp
@@ -113,9 +113,9 @@ docstring const from_local8bit(string const & s)
 /// Exception thrown by to_local8bit if the string could not be converted
 class to_local8bit_failure : public bad_cast {
 public:
-       to_local8bit_failure() throw() : bad_cast() {}
-       virtual ~to_local8bit_failure() throw() {}
-       const char* what() const throw() override
+       to_local8bit_failure() noexcept : bad_cast() {}
+       virtual ~to_local8bit_failure() noexcept {}
+       const char* what() const noexcept override
        {
                return "A string could not be converted from unicode to the 
local 8 bit encoding.";
        }
@@ -280,9 +280,9 @@ namespace lyx {
 
 class ctype_failure : public bad_cast {
 public:
-       ctype_failure() throw() : bad_cast() {}
-       virtual ~ctype_failure() throw() {}
-       const char* what() const throw() override
+       ctype_failure() noexcept : bad_cast() {}
+       virtual ~ctype_failure() noexcept {}
+       const char* what() const noexcept override
        {
                return "The ctype<lyx::char_type> locale facet does only 
support ASCII characters on this platform.";
        }
@@ -291,9 +291,9 @@ public:
 
 class num_put_failure : public bad_cast {
 public:
-       num_put_failure() throw() : bad_cast() {}
-       virtual ~num_put_failure() throw() {}
-       const char* what() const throw() override
+       num_put_failure() noexcept : bad_cast() {}
+       virtual ~num_put_failure() noexcept {}
+       const char* what() const noexcept override
        {
                return "The num_put locale facet does only support ASCII 
characters on this platform.";
        }
-- 
2.28.0.windows.1

-- 
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel

Reply via email to