From e6f3d0a14e4fb7a8fb2a5cf26e61399b2b62290d Mon Sep 17 00:00:00 2001 From: Nicolas Fella Date: Wed, 4 Dec 2019 02:53:28 +0000 Subject: [PATCH] Replace Q_DECL_OVERRIDE with override --- src/Application.h | 2 +- src/BookmarkHandler.h | 14 ++++---- src/ColorSchemeEditor.h | 2 +- src/CopyInputDialog.h | 10 +++--- src/EditProfileDialog.h | 12 +++---- src/Emulation.h | 2 +- src/Filter.h | 24 ++++++------- src/History.h | 64 +++++++++++++++++----------------- src/HistorySizeDialog.h | 2 +- src/HistorySizeWidget.h | 2 +- src/IncrementalSearchBar.h | 6 ++-- src/KeyBindingEditor.h | 8 ++--- src/MainWindow.h | 16 ++++----- src/Part.h | 6 ++-- src/PrintOptions.h | 2 +- src/ProcessInfo.cpp | 30 ++++++++-------- src/ProcessInfo.h | 10 +++--- src/Profile.h | 2 +- src/ProfileManager.h | 2 +- src/Pty.h | 4 +-- src/RenameTabDialog.h | 2 +- src/RenameTabWidget.h | 2 +- src/SaveHistoryTask.h | 4 +-- src/ScreenWindow.h | 2 +- src/SearchHistoryTask.h | 2 +- src/Session.h | 4 +-- src/SessionController.h | 12 +++---- src/SessionListModel.h | 12 +++---- src/SessionManager.h | 2 +- src/TabTitleFormatButton.h | 2 +- src/TerminalCharacterDecoder.h | 12 +++---- src/TerminalDisplay.h | 50 +++++++++++++------------- src/ViewContainer.h | 4 +-- src/ViewManager.h | 2 +- src/ViewProperties.h | 2 +- src/Vt102Emulation.h | 26 +++++++------- src/settings/GeneralSettings.h | 2 +- src/settings/PartInfo.h | 2 +- src/settings/ProfileSettings.h | 14 ++++---- src/settings/TabBarSettings.h | 2 +- 40 files changed, 190 insertions(+), 190 deletions(-) diff --git a/src/Application.h b/src/Application.h index 98d44dd29..8da2a9eb6 100644 --- a/src/Application.h +++ b/src/Application.h @@ -55,7 +55,7 @@ public: static void populateCommandLineParser(QCommandLineParser *parser); static QStringList getCustomCommand(QStringList &args); - ~Application() Q_DECL_OVERRIDE; + ~Application() override; /** Creates a new main window and opens a default terminal session */ int newInstance(); diff --git a/src/BookmarkHandler.h b/src/BookmarkHandler.h index 7be535ed0..5485771f6 100644 --- a/src/BookmarkHandler.h +++ b/src/BookmarkHandler.h @@ -62,13 +62,13 @@ public: * @param parent The parent object */ BookmarkHandler(KActionCollection *collection, QMenu *menu, bool toplevel, QObject *parent); - ~BookmarkHandler() Q_DECL_OVERRIDE; + ~BookmarkHandler() override; - QUrl currentUrl() const Q_DECL_OVERRIDE; - QString currentTitle() const Q_DECL_OVERRIDE; - QString currentIcon() const Q_DECL_OVERRIDE; - bool enableOption(BookmarkOption option) const Q_DECL_OVERRIDE; - void openFolderinTabs(const KBookmarkGroup &group) Q_DECL_OVERRIDE; + QUrl currentUrl() const override; + QString currentTitle() const override; + QString currentIcon() const override; + bool enableOption(BookmarkOption option) const override; + void openFolderinTabs(const KBookmarkGroup &group) override; /** * Returns the menu which this bookmark handler inserts its actions into. @@ -107,7 +107,7 @@ Q_SIGNALS: void openUrls(const QList &urls); private Q_SLOTS: - void openBookmark(const KBookmark &bm, Qt::MouseButtons, Qt::KeyboardModifiers) Q_DECL_OVERRIDE; + void openBookmark(const KBookmark &bm, Qt::MouseButtons, Qt::KeyboardModifiers) override; private: Q_DISABLE_COPY(BookmarkHandler) diff --git a/src/ColorSchemeEditor.h b/src/ColorSchemeEditor.h index 459aba3f1..7a2814058 100644 --- a/src/ColorSchemeEditor.h +++ b/src/ColorSchemeEditor.h @@ -57,7 +57,7 @@ class KONSOLEPRIVATE_EXPORT ColorSchemeEditor : public QDialog public: /** Constructs a new color scheme editor with the specified parent. */ explicit ColorSchemeEditor(QWidget *parent = nullptr); - ~ColorSchemeEditor() Q_DECL_OVERRIDE; + ~ColorSchemeEditor() override; /** Initializes the dialog with the properties of the specified color scheme. */ void setup(const ColorScheme *scheme, bool isNewScheme); diff --git a/src/CopyInputDialog.h b/src/CopyInputDialog.h index f4dee6cb0..0777decc3 100644 --- a/src/CopyInputDialog.h +++ b/src/CopyInputDialog.h @@ -51,7 +51,7 @@ class CopyInputDialog : public QDialog public: explicit CopyInputDialog(QWidget *parent = nullptr); - ~CopyInputDialog() Q_DECL_OVERRIDE; + ~CopyInputDialog() override; /** * Sets the 'source' session whose input will be copied to * other sessions. This session is displayed grayed out in the list @@ -117,12 +117,12 @@ public: QSet checkedSessions() const; // reimplemented from QAbstractItemModel - Qt::ItemFlags flags(const QModelIndex &index) const Q_DECL_OVERRIDE; - QVariant data(const QModelIndex &index, int role) const Q_DECL_OVERRIDE; - bool setData(const QModelIndex &index, const QVariant &value, int role) Q_DECL_OVERRIDE; + Qt::ItemFlags flags(const QModelIndex &index) const override; + QVariant data(const QModelIndex &index, int role) const override; + bool setData(const QModelIndex &index, const QVariant &value, int role) override; protected: - void sessionRemoved(Session *) Q_DECL_OVERRIDE; + void sessionRemoved(Session *) override; private: QSet _checkedSessions; diff --git a/src/EditProfileDialog.h b/src/EditProfileDialog.h index d9e9b6e85..f20727f88 100644 --- a/src/EditProfileDialog.h +++ b/src/EditProfileDialog.h @@ -74,7 +74,7 @@ class KONSOLEPRIVATE_EXPORT EditProfileDialog: public KPageDialog public: /** Constructs a new dialog with the specified parent. */ explicit EditProfileDialog(QWidget *parent = nullptr); - ~EditProfileDialog() Q_DECL_OVERRIDE; + ~EditProfileDialog() override; /** * Initializes the dialog with the settings for the specified session @@ -98,14 +98,14 @@ public: public Q_SLOTS: // reimplemented - void accept() Q_DECL_OVERRIDE; + void accept() override; // reimplemented - void reject() Q_DECL_OVERRIDE; + void reject() override; void apply(); protected: - bool eventFilter(QObject *watched, QEvent *event) Q_DECL_OVERRIDE; + bool eventFilter(QObject *watched, QEvent *event) override; private Q_SLOTS: QSize sizeHint() const override; @@ -359,9 +359,9 @@ public: // reimplemented void paint(QPainter *painter, const QStyleOptionViewItem &option, - const QModelIndex &index) const Q_DECL_OVERRIDE; + const QModelIndex &index) const override; QSize sizeHint(const QStyleOptionViewItem &option, - const QModelIndex &index) const Q_DECL_OVERRIDE; + const QModelIndex &index) const override; }; /** diff --git a/src/Emulation.h b/src/Emulation.h index a89d627bc..cf99447cd 100644 --- a/src/Emulation.h +++ b/src/Emulation.h @@ -121,7 +121,7 @@ class KONSOLEPRIVATE_EXPORT Emulation : public QObject public: /** Constructs a new terminal emulation */ Emulation(); - ~Emulation() Q_DECL_OVERRIDE; + ~Emulation() override; /** * Creates a new window onto the output from this emulation. The contents diff --git a/src/Filter.h b/src/Filter.h index 8f7272e5c..20de7f69a 100644 --- a/src/Filter.h +++ b/src/Filter.h @@ -192,7 +192,7 @@ public: public: HotSpot(int startLine, int startColumn, int endLine, int endColumn, const QStringList &capturedTexts); - void activate(QObject *object = nullptr) Q_DECL_OVERRIDE; + void activate(QObject *object = nullptr) override; /** Returns the texts found by the filter when matching the filter's regular expression */ QStringList capturedTexts() const; @@ -219,7 +219,7 @@ public: * If regexp matches the empty string, then process() will return immediately * without finding results. */ - void process() Q_DECL_OVERRIDE; + void process() override; protected: /** @@ -248,15 +248,15 @@ public: public: HotSpot(int startLine, int startColumn, int endLine, int endColumn, const QStringList &capturedTexts); - ~HotSpot() Q_DECL_OVERRIDE; + ~HotSpot() override; - QList actions() Q_DECL_OVERRIDE; + QList actions() override; /** * Open a web browser at the current URL. The url itself can be determined using * the capturedTexts() method. */ - void activate(QObject *object = nullptr) Q_DECL_OVERRIDE; + void activate(QObject *object = nullptr) override; private: enum UrlType { @@ -272,7 +272,7 @@ public: UrlFilter(); protected: - RegExpFilter::HotSpot *newHotSpot(int, int, int, int, const QStringList &) Q_DECL_OVERRIDE; + RegExpFilter::HotSpot *newHotSpot(int, int, int, int, const QStringList &) override; private: static const QRegularExpression FullUrlRegExp; @@ -297,14 +297,14 @@ public: public: HotSpot(int startLine, int startColumn, int endLine, int endColumn, const QStringList &capturedTexts, const QString &filePath); - ~HotSpot() Q_DECL_OVERRIDE; + ~HotSpot() override; - QList actions() Q_DECL_OVERRIDE; + QList actions() override; /** * Opens kate for editing the file. */ - void activate(QObject *object = nullptr) Q_DECL_OVERRIDE; + void activate(QObject *object = nullptr) override; private: FilterObject *_fileObject; @@ -313,10 +313,10 @@ public: explicit FileFilter(Session *session); - void process() Q_DECL_OVERRIDE; + void process() override; protected: - RegExpFilter::HotSpot *newHotSpot(int, int, int, int, const QStringList &) Q_DECL_OVERRIDE; + RegExpFilter::HotSpot *newHotSpot(int, int, int, int, const QStringList &) override; private: QPointer _session; @@ -390,7 +390,7 @@ class TerminalImageFilterChain : public FilterChain { public: TerminalImageFilterChain(); - ~TerminalImageFilterChain() Q_DECL_OVERRIDE; + ~TerminalImageFilterChain() override; /** * Set the current terminal image to @p image. diff --git a/src/History.h b/src/History.h index d89297d4e..e22ce73e1 100644 --- a/src/History.h +++ b/src/History.h @@ -125,15 +125,15 @@ class KONSOLEPRIVATE_EXPORT HistoryScrollFile : public HistoryScroll { public: explicit HistoryScrollFile(); - ~HistoryScrollFile() Q_DECL_OVERRIDE; + ~HistoryScrollFile() override; - int getLines() Q_DECL_OVERRIDE; - int getLineLen(int lineno) Q_DECL_OVERRIDE; - void getCells(int lineno, int colno, int count, Character res[]) Q_DECL_OVERRIDE; - bool isWrappedLine(int lineno) Q_DECL_OVERRIDE; + int getLines() override; + int getLineLen(int lineno) override; + void getCells(int lineno, int colno, int count, Character res[]) override; + bool isWrappedLine(int lineno) override; - void addCells(const Character text[], int count) Q_DECL_OVERRIDE; - void addLine(bool previousWrapped = false) Q_DECL_OVERRIDE; + void addCells(const Character text[], int count) override; + void addLine(bool previousWrapped = false) override; private: qint64 startOfLine(int lineno); @@ -150,17 +150,17 @@ class KONSOLEPRIVATE_EXPORT HistoryScrollNone : public HistoryScroll { public: HistoryScrollNone(); - ~HistoryScrollNone() Q_DECL_OVERRIDE; + ~HistoryScrollNone() override; - bool hasScroll() Q_DECL_OVERRIDE; + bool hasScroll() override; - int getLines() Q_DECL_OVERRIDE; - int getLineLen(int lineno) Q_DECL_OVERRIDE; - void getCells(int lineno, int colno, int count, Character res[]) Q_DECL_OVERRIDE; - bool isWrappedLine(int lineno) Q_DECL_OVERRIDE; + int getLines() override; + int getLineLen(int lineno) override; + void getCells(int lineno, int colno, int count, Character res[]) override; + bool isWrappedLine(int lineno) override; - void addCells(const Character a[], int count) Q_DECL_OVERRIDE; - void addLine(bool previousWrapped = false) Q_DECL_OVERRIDE; + void addCells(const Character a[], int count) override; + void addLine(bool previousWrapped = false) override; }; ////////////////////////////////////////////////////////////////////// @@ -315,16 +315,16 @@ class KONSOLEPRIVATE_EXPORT CompactHistoryScroll : public HistoryScroll public: explicit CompactHistoryScroll(unsigned int maxLineCount = 1000); - ~CompactHistoryScroll() Q_DECL_OVERRIDE; + ~CompactHistoryScroll() override; - int getLines() Q_DECL_OVERRIDE; - int getLineLen(int lineNumber) Q_DECL_OVERRIDE; - void getCells(int lineNumber, int startColumn, int count, Character buffer[]) Q_DECL_OVERRIDE; - bool isWrappedLine(int lineNumber) Q_DECL_OVERRIDE; + int getLines() override; + int getLineLen(int lineNumber) override; + void getCells(int lineNumber, int startColumn, int count, Character buffer[]) override; + bool isWrappedLine(int lineNumber) override; - void addCells(const Character a[], int count) Q_DECL_OVERRIDE; - void addCellsVector(const TextLine &cells) Q_DECL_OVERRIDE; - void addLine(bool previousWrapped = false) Q_DECL_OVERRIDE; + void addCells(const Character a[], int count) override; + void addCellsVector(const TextLine &cells) override; + void addLine(bool previousWrapped = false) override; void setMaxNbLines(unsigned int lineCount); @@ -375,10 +375,10 @@ class KONSOLEPRIVATE_EXPORT HistoryTypeNone : public HistoryType public: HistoryTypeNone(); - bool isEnabled() const Q_DECL_OVERRIDE; - int maximumLineCount() const Q_DECL_OVERRIDE; + bool isEnabled() const override; + int maximumLineCount() const override; - HistoryScroll *scroll(HistoryScroll *) const Q_DECL_OVERRIDE; + HistoryScroll *scroll(HistoryScroll *) const override; }; class KONSOLEPRIVATE_EXPORT HistoryTypeFile : public HistoryType @@ -386,10 +386,10 @@ class KONSOLEPRIVATE_EXPORT HistoryTypeFile : public HistoryType public: explicit HistoryTypeFile(); - bool isEnabled() const Q_DECL_OVERRIDE; - int maximumLineCount() const Q_DECL_OVERRIDE; + bool isEnabled() const override; + int maximumLineCount() const override; - HistoryScroll *scroll(HistoryScroll *) const Q_DECL_OVERRIDE; + HistoryScroll *scroll(HistoryScroll *) const override; }; class KONSOLEPRIVATE_EXPORT CompactHistoryType : public HistoryType @@ -397,10 +397,10 @@ class KONSOLEPRIVATE_EXPORT CompactHistoryType : public HistoryType public: explicit CompactHistoryType(unsigned int nbLines); - bool isEnabled() const Q_DECL_OVERRIDE; - int maximumLineCount() const Q_DECL_OVERRIDE; + bool isEnabled() const override; + int maximumLineCount() const override; - HistoryScroll *scroll(HistoryScroll *) const Q_DECL_OVERRIDE; + HistoryScroll *scroll(HistoryScroll *) const override; protected: unsigned int _maxLines; diff --git a/src/HistorySizeDialog.h b/src/HistorySizeDialog.h index 8750cb450..4b9799a8d 100644 --- a/src/HistorySizeDialog.h +++ b/src/HistorySizeDialog.h @@ -38,7 +38,7 @@ class HistorySizeDialog : public QDialog public: explicit HistorySizeDialog(QWidget *parent = nullptr); - ~HistorySizeDialog() Q_DECL_OVERRIDE; + ~HistorySizeDialog() override; /** See HistorySizeWidget::setMode. */ void setMode(Enum::HistoryModeEnum aMode); diff --git a/src/HistorySizeWidget.h b/src/HistorySizeWidget.h index 665152638..b14abd174 100644 --- a/src/HistorySizeWidget.h +++ b/src/HistorySizeWidget.h @@ -43,7 +43,7 @@ class HistorySizeWidget : public QWidget public: explicit HistorySizeWidget(QWidget *parent); - ~HistorySizeWidget() Q_DECL_OVERRIDE; + ~HistorySizeWidget() override; /** Specifies the history mode. */ void setMode(Enum::HistoryModeEnum aMode); diff --git a/src/IncrementalSearchBar.h b/src/IncrementalSearchBar.h index b6606e928..a5559547a 100644 --- a/src/IncrementalSearchBar.h +++ b/src/IncrementalSearchBar.h @@ -101,7 +101,7 @@ public: void setOptions(); // reimplemented - void setVisible(bool visible) Q_DECL_OVERRIDE; + void setVisible(bool visible) override; Q_SIGNALS: /** Emitted when the text entered in the search box is altered */ void searchChanged(const QString &text); @@ -136,8 +136,8 @@ Q_SIGNALS: void unhandledMovementKeyPressed(QKeyEvent *event); protected: - bool eventFilter(QObject *watched, QEvent *event) Q_DECL_OVERRIDE; - void keyPressEvent(QKeyEvent *event) Q_DECL_OVERRIDE; + bool eventFilter(QObject *watched, QEvent *event) override; + void keyPressEvent(QKeyEvent *event) override; public Q_SLOTS: void clearLineEdit(); diff --git a/src/KeyBindingEditor.h b/src/KeyBindingEditor.h index a27b28c35..dadceb34d 100644 --- a/src/KeyBindingEditor.h +++ b/src/KeyBindingEditor.h @@ -55,7 +55,7 @@ class KeyBindingEditor : public QDialog public: /** Constructs a new key bindings editor with the specified parent. */ explicit KeyBindingEditor(QWidget *parent = nullptr); - ~KeyBindingEditor() Q_DECL_OVERRIDE; + ~KeyBindingEditor() override; /** * Initializes the dialog with the bindings and other settings @@ -86,7 +86,7 @@ public: QString description() const; // reimplemented to handle test area input - bool eventFilter(QObject *watched, QEvent *event) Q_DECL_OVERRIDE; + bool eventFilter(QObject *watched, QEvent *event) override; Q_SIGNALS: /** @@ -111,7 +111,7 @@ Q_SIGNALS: private Q_SLOTS: // reimplemented - void accept() Q_DECL_OVERRIDE; + void accept() override; void setTranslatorDescription(const QString &description); void bindingTableItemChanged(QTableWidgetItem *item); @@ -142,7 +142,7 @@ private: // Sets the size hint of the dialog to be slightly smaller than the // size of EditProfileDialog - QSize sizeHint() const Q_DECL_OVERRIDE; + QSize sizeHint() const override; }; } diff --git a/src/MainWindow.h b/src/MainWindow.h index 89958fc0d..f296d41e4 100644 --- a/src/MainWindow.h +++ b/src/MainWindow.h @@ -126,18 +126,18 @@ Q_SIGNALS: protected: // Reimplemented for internal reasons. - void showEvent(QShowEvent *event) Q_DECL_OVERRIDE; - bool eventFilter(QObject *obj, QEvent *event) Q_DECL_OVERRIDE; + void showEvent(QShowEvent *event) override; + bool eventFilter(QObject *obj, QEvent *event) override; // reimplemented from KMainWindow - bool queryClose() Q_DECL_OVERRIDE; - void saveProperties(KConfigGroup &group) Q_DECL_OVERRIDE; - void readProperties(const KConfigGroup &group) Q_DECL_OVERRIDE; - void saveGlobalProperties(KConfig *config) Q_DECL_OVERRIDE; - void readGlobalProperties(KConfig *config) Q_DECL_OVERRIDE; + bool queryClose() override; + void saveProperties(KConfigGroup &group) override; + void readProperties(const KConfigGroup &group) override; + void saveGlobalProperties(KConfig *config) override; + void readGlobalProperties(KConfig *config) override; // reimplemented from QWidget - bool focusNextPrevChild(bool next) Q_DECL_OVERRIDE; + bool focusNextPrevChild(bool next) override; private Q_SLOTS: void newTab(); diff --git a/src/Part.h b/src/Part.h index afda8e5ef..283d7d9f6 100644 --- a/src/Part.h +++ b/src/Part.h @@ -58,7 +58,7 @@ class Part : public KParts::ReadOnlyPart, public TerminalInterface public: /** Constructs a new Konsole part with the specified parent. */ explicit Part(QWidget *parentWidget, QObject *parent, const QVariantList &); - ~Part() Q_DECL_OVERRIDE; + ~Part() override; /** Reimplemented from TerminalInterface. */ void startProgram(const QString &program, const QStringList &arguments) override; @@ -199,8 +199,8 @@ Q_SIGNALS: protected: /** Reimplemented from KParts::PartBase. */ - bool openFile() Q_DECL_OVERRIDE; - bool openUrl(const QUrl &url) Q_DECL_OVERRIDE; + bool openFile() override; + bool openUrl(const QUrl &url) override; private Q_SLOTS: void activeViewChanged(SessionController *controller); diff --git a/src/PrintOptions.h b/src/PrintOptions.h index 816596577..014fc9cdc 100644 --- a/src/PrintOptions.h +++ b/src/PrintOptions.h @@ -30,7 +30,7 @@ class PrintOptions : public QWidget, private Ui::PrintOptions public: explicit PrintOptions(QWidget *parent = nullptr); - ~PrintOptions() Q_DECL_OVERRIDE; + ~PrintOptions() override; public Q_SLOTS: void saveSettings(); diff --git a/src/ProcessInfo.cpp b/src/ProcessInfo.cpp index b3889914a..93f5740f0 100644 --- a/src/ProcessInfo.cpp +++ b/src/ProcessInfo.cpp @@ -428,7 +428,7 @@ public: } protected: - bool readCurrentDir(int pid) Q_DECL_OVERRIDE + bool readCurrentDir(int pid) override { char path_buffer[MAXPATHLEN + 1]; path_buffer[MAXPATHLEN] = 0; @@ -447,7 +447,7 @@ protected: } private: - bool readProcInfo(int pid) Q_DECL_OVERRIDE + bool readProcInfo(int pid) override { // indicies of various fields within the process status file which // contain various information about the process @@ -569,7 +569,7 @@ private: return ok; } - bool readArguments(int pid) Q_DECL_OVERRIDE + bool readArguments(int pid) override { // read command-line arguments file found at /proc//cmdline // the expected format is a list of strings delimited by null characters, @@ -605,7 +605,7 @@ public: } protected: - bool readCurrentDir(int pid) Q_DECL_OVERRIDE + bool readCurrentDir(int pid) override { #if defined(HAVE_OS_DRAGONFLYBSD) char buf[PATH_MAX]; @@ -650,7 +650,7 @@ protected: } private: - bool readProcInfo(int pid) Q_DECL_OVERRIDE + bool readProcInfo(int pid) override { int managementInfoBase[4]; size_t mibLength; @@ -692,7 +692,7 @@ private: return true; } - bool readArguments(int pid) Q_DECL_OVERRIDE + bool readArguments(int pid) override { char args[ARG_MAX]; int managementInfoBase[4]; @@ -730,7 +730,7 @@ public: } protected: - bool readCurrentDir(int pid) Q_DECL_OVERRIDE + bool readCurrentDir(int pid) override { char buf[PATH_MAX]; int managementInfoBase[3]; @@ -751,7 +751,7 @@ protected: } private: - bool readProcInfo(int pid) Q_DECL_OVERRIDE + bool readProcInfo(int pid) override { int managementInfoBase[6]; size_t mibLength; @@ -821,7 +821,7 @@ private: return (char **)buf; } - bool readArguments(int pid) Q_DECL_OVERRIDE + bool readArguments(int pid) override { char **argv; @@ -848,7 +848,7 @@ public: } protected: - bool readCurrentDir(int pid) Q_DECL_OVERRIDE + bool readCurrentDir(int pid) override { struct proc_vnodepathinfo vpi; const int nb = proc_pidinfo(pid, PROC_PIDVNODEPATHINFO, 0, &vpi, sizeof(vpi)); @@ -860,7 +860,7 @@ protected: } private: - bool readProcInfo(int pid) Q_DECL_OVERRIDE + bool readProcInfo(int pid) override { int managementInfoBase[4]; size_t mibLength; @@ -921,7 +921,7 @@ private: return true; } - bool readArguments(int pid) Q_DECL_OVERRIDE + bool readArguments(int pid) override { Q_UNUSED(pid); return false; @@ -951,7 +951,7 @@ public: protected: // FIXME: This will have the same issues as BKO 251351; the Linux // version uses readlink. - bool readCurrentDir(int pid) Q_DECL_OVERRIDE + bool readCurrentDir(int pid) override { QFileInfo info(QString("/proc/%1/path/cwd").arg(pid)); const bool readable = info.isReadable(); @@ -971,7 +971,7 @@ protected: } private: - bool readProcInfo(int pid) Q_DECL_OVERRIDE + bool readProcInfo(int pid) override { QFile psinfo(QString("/proc/%1/psinfo").arg(pid)); if (psinfo.open(QIODevice::ReadOnly)) { @@ -992,7 +992,7 @@ private: return true; } - bool readArguments(int /*pid*/) Q_DECL_OVERRIDE + bool readArguments(int /*pid*/) override { // Handled in readProcInfo() return false; diff --git a/src/ProcessInfo.h b/src/ProcessInfo.h index 3581598ef..7ae1e3f8b 100644 --- a/src/ProcessInfo.h +++ b/src/ProcessInfo.h @@ -304,9 +304,9 @@ public: */ explicit NullProcessInfo(int pid); protected: - void readProcessInfo(int pid) Q_DECL_OVERRIDE; - bool readCurrentDir(int pid) Q_DECL_OVERRIDE; - void readUserName(void) Q_DECL_OVERRIDE; + void readProcessInfo(int pid) override; + bool readCurrentDir(int pid) override; + void readUserName(void) override; }; #if !defined(Q_OS_WIN) @@ -328,9 +328,9 @@ protected: * Implementation of ProcessInfo::readProcessInfo(); calls the * four private methods below in turn. */ - void readProcessInfo(int pid) Q_DECL_OVERRIDE; + void readProcessInfo(int pid) override; - void readUserName(void) Q_DECL_OVERRIDE; + void readUserName(void) override; private: /** diff --git a/src/Profile.h b/src/Profile.h index eee5f766e..eb9ce9e73 100644 --- a/src/Profile.h +++ b/src/Profile.h @@ -751,7 +751,7 @@ public: /** Sets the value of @p property in each of the group's profiles to * @p value. */ - void setProperty(Property p, const QVariant &value) Q_DECL_OVERRIDE; + void setProperty(Property p, const QVariant &value) override; private: Q_DISABLE_COPY(ProfileGroup) diff --git a/src/ProfileManager.h b/src/ProfileManager.h index 2a117f1c0..69d39577d 100644 --- a/src/ProfileManager.h +++ b/src/ProfileManager.h @@ -58,7 +58,7 @@ public: /** * Destroys the ProfileManager. */ - ~ProfileManager() Q_DECL_OVERRIDE; + ~ProfileManager() override; /** * Returns the profile manager instance. diff --git a/src/Pty.h b/src/Pty.h index 7a79d97cb..6cbee2e5a 100644 --- a/src/Pty.h +++ b/src/Pty.h @@ -70,7 +70,7 @@ public: */ explicit Pty(int ptyMasterFd, QObject *parent = nullptr); - ~Pty() Q_DECL_OVERRIDE; + ~Pty() override; /** * Starts the terminal process. @@ -167,7 +167,7 @@ Q_SIGNALS: void receivedData(const char *buffer, int length); protected: - void setupChildProcess() Q_DECL_OVERRIDE; + void setupChildProcess() override; private Q_SLOTS: // called when data is received from the terminal process diff --git a/src/RenameTabDialog.h b/src/RenameTabDialog.h index 05313875a..c8922c11a 100644 --- a/src/RenameTabDialog.h +++ b/src/RenameTabDialog.h @@ -34,7 +34,7 @@ class RenameTabDialog : public QDialog public: explicit RenameTabDialog(QWidget *parent = nullptr); - ~RenameTabDialog() Q_DECL_OVERRIDE; + ~RenameTabDialog() override; QString tabTitleText() const; QString remoteTabTitleText() const; diff --git a/src/RenameTabWidget.h b/src/RenameTabWidget.h index 5739e1c06..60cd39813 100644 --- a/src/RenameTabWidget.h +++ b/src/RenameTabWidget.h @@ -34,7 +34,7 @@ class RenameTabWidget : public QWidget public: explicit RenameTabWidget(QWidget *parent = nullptr); - ~RenameTabWidget() Q_DECL_OVERRIDE; + ~RenameTabWidget() override; QString tabTitleText() const; QString remoteTabTitleText() const; diff --git a/src/SaveHistoryTask.h b/src/SaveHistoryTask.h index 65504d6f6..1359edb15 100644 --- a/src/SaveHistoryTask.h +++ b/src/SaveHistoryTask.h @@ -40,7 +40,7 @@ class SaveHistoryTask : public SessionTask public: /** Constructs a new task to save session output to URLs */ explicit SaveHistoryTask(QObject *parent = nullptr); - ~SaveHistoryTask() Q_DECL_OVERRIDE; + ~SaveHistoryTask() override; /** * Opens a save file dialog for each session in the group and begins saving @@ -48,7 +48,7 @@ public: * * The data transfer is performed asynchronously and will continue after execute() returns. */ - void execute() Q_DECL_OVERRIDE; + void execute() override; private Q_SLOTS: void jobDataRequested(KIO::Job *job, QByteArray &data); diff --git a/src/ScreenWindow.h b/src/ScreenWindow.h index 8be16990a..a3738975c 100644 --- a/src/ScreenWindow.h +++ b/src/ScreenWindow.h @@ -63,7 +63,7 @@ public: * between all views on a session. */ explicit ScreenWindow(Screen *screen, QObject *parent = nullptr); - ~ScreenWindow() Q_DECL_OVERRIDE; + ~ScreenWindow() override; /** Sets the screen which this window looks onto */ void setScreen(Screen *screen); diff --git a/src/SearchHistoryTask.h b/src/SearchHistoryTask.h index 16d06fca9..bdd0b24cb 100644 --- a/src/SearchHistoryTask.h +++ b/src/SearchHistoryTask.h @@ -84,7 +84,7 @@ public: * * To continue the search looking for further matches, call execute() again. */ - void execute() Q_DECL_OVERRIDE; + void execute() override; private: using ScreenWindowPtr = QPointer; diff --git a/src/Session.h b/src/Session.h index 9d5ad6a2f..b1a14bb49 100644 --- a/src/Session.h +++ b/src/Session.h @@ -85,7 +85,7 @@ public: * variable. */ explicit Session(QObject *parent = nullptr); - ~Session() Q_DECL_OVERRIDE; + ~Session() override; /** * Connect to an existing terminal. When a new Session() is constructed it @@ -840,7 +840,7 @@ public: /** Constructs an empty session group. */ explicit SessionGroup(QObject *parent); /** Destroys the session group and removes all connections between master and slave sessions. */ - ~SessionGroup() Q_DECL_OVERRIDE; + ~SessionGroup() override; /** Adds a session to the group. */ void addSession(Session *session); diff --git a/src/SessionController.h b/src/SessionController.h index ca03abdff..be1b1995a 100644 --- a/src/SessionController.h +++ b/src/SessionController.h @@ -92,7 +92,7 @@ public: * Constructs a new SessionController which operates on @p session and @p view. */ SessionController(Session *session, TerminalDisplay *view, QObject *parent); - ~SessionController() Q_DECL_OVERRIDE; + ~SessionController() override; /** Returns the session associated with this controller */ QPointer session() @@ -135,14 +135,14 @@ public: EditProfileDialog *profileDialogPointer(); // reimplemented - QUrl url() const Q_DECL_OVERRIDE; - QString currentDir() const Q_DECL_OVERRIDE; - void rename() Q_DECL_OVERRIDE; - bool confirmClose() const Q_DECL_OVERRIDE; + QUrl url() const override; + QString currentDir() const override; + void rename() override; + bool confirmClose() const override; virtual bool confirmForceClose() const; // Reimplemented to watch for events happening to the view - bool eventFilter(QObject *watched, QEvent *event) Q_DECL_OVERRIDE; + bool eventFilter(QObject *watched, QEvent *event) override; /** Returns the set of all controllers that exist. */ static QSet allControllers() diff --git a/src/SessionListModel.h b/src/SessionListModel.h index 5a150030d..b37119419 100644 --- a/src/SessionListModel.h +++ b/src/SessionListModel.h @@ -53,12 +53,12 @@ public: void setSessions(const QList &sessions); // reimplemented from QAbstractItemModel - QModelIndex index(int row, int column, const QModelIndex &parent) const Q_DECL_OVERRIDE; - QVariant data(const QModelIndex &index, int role) const Q_DECL_OVERRIDE; - QVariant headerData(int section, Qt::Orientation orientation, int role) const Q_DECL_OVERRIDE; - int columnCount(const QModelIndex &parent) const Q_DECL_OVERRIDE; - int rowCount(const QModelIndex &parent) const Q_DECL_OVERRIDE; - QModelIndex parent(const QModelIndex &index) const Q_DECL_OVERRIDE; + QModelIndex index(int row, int column, const QModelIndex &parent) const override; + QVariant data(const QModelIndex &index, int role) const override; + QVariant headerData(int section, Qt::Orientation orientation, int role) const override; + int columnCount(const QModelIndex &parent) const override; + int rowCount(const QModelIndex &parent) const override; + QModelIndex parent(const QModelIndex &index) const override; protected: virtual void sessionRemoved(Session *) diff --git a/src/SessionManager.h b/src/SessionManager.h index 3bfc39fe8..e5ee76d72 100644 --- a/src/SessionManager.h +++ b/src/SessionManager.h @@ -52,7 +52,7 @@ public: * Destroys the SessionManager. All running sessions should be closed * (via closeAllSessions()) before the SessionManager is destroyed. */ - ~SessionManager() Q_DECL_OVERRIDE; + ~SessionManager() override; /** * Returns the session manager instance. diff --git a/src/TabTitleFormatButton.h b/src/TabTitleFormatButton.h index 73cb272df..b8209ca2f 100644 --- a/src/TabTitleFormatButton.h +++ b/src/TabTitleFormatButton.h @@ -34,7 +34,7 @@ class TabTitleFormatButton : public QPushButton public: explicit TabTitleFormatButton(QWidget *parent); - ~TabTitleFormatButton() Q_DECL_OVERRIDE; + ~TabTitleFormatButton() override; void setContext(Session::TabTitleContext titleContext); Session::TabTitleContext context() const; diff --git a/src/TerminalCharacterDecoder.h b/src/TerminalCharacterDecoder.h index 394067e73..f2fd0d6dd 100644 --- a/src/TerminalCharacterDecoder.h +++ b/src/TerminalCharacterDecoder.h @@ -96,11 +96,11 @@ public: /** Enables recording of character positions at which new lines are added. See linePositions() */ void setRecordLinePositions(bool record); - void begin(QTextStream *output) Q_DECL_OVERRIDE; - void end() Q_DECL_OVERRIDE; + void begin(QTextStream *output) override; + void end() override; void decodeLine(const Character * const characters, int count, - LineProperty properties) Q_DECL_OVERRIDE; + LineProperty properties) override; private: QTextStream *_output; @@ -123,10 +123,10 @@ public: explicit HTMLDecoder(const Profile::Ptr &profile = Profile::Ptr()); void decodeLine(const Character * const characters, int count, - LineProperty properties) Q_DECL_OVERRIDE; + LineProperty properties) override; - void begin(QTextStream *output) Q_DECL_OVERRIDE; - void end() Q_DECL_OVERRIDE; + void begin(QTextStream *output) override; + void end() override; private: void openSpan(QString &text, const QString &style); diff --git a/src/TerminalDisplay.h b/src/TerminalDisplay.h index 7c78dafb5..507fd6a19 100644 --- a/src/TerminalDisplay.h +++ b/src/TerminalDisplay.h @@ -72,7 +72,7 @@ class KONSOLEPRIVATE_EXPORT TerminalDisplay : public QWidget public: /** Constructs a new terminal display widget with the specified parent. */ explicit TerminalDisplay(QWidget *parent = nullptr); - ~TerminalDisplay() Q_DECL_OVERRIDE; + ~TerminalDisplay() override; void showDragTarget(const QPoint& pos); void hideDragTarget(); @@ -256,7 +256,7 @@ public: void setSize(int columns, int lines); // reimplemented - QSize sizeHint() const Q_DECL_OVERRIDE; + QSize sizeHint() const override; /** * Sets which characters, in addition to letters and numbers, @@ -540,30 +540,30 @@ Q_SIGNALS: protected: // events - bool event(QEvent *event) Q_DECL_OVERRIDE; - void paintEvent(QPaintEvent *pe) Q_DECL_OVERRIDE; - void showEvent(QShowEvent *event) Q_DECL_OVERRIDE; - void hideEvent(QHideEvent *event) Q_DECL_OVERRIDE; - void resizeEvent(QResizeEvent *event) Q_DECL_OVERRIDE; - void contextMenuEvent(QContextMenuEvent *event) Q_DECL_OVERRIDE; - void focusInEvent(QFocusEvent *event) Q_DECL_OVERRIDE; - void focusOutEvent(QFocusEvent *event) Q_DECL_OVERRIDE; - void keyPressEvent(QKeyEvent *event) Q_DECL_OVERRIDE; - void keyReleaseEvent(QKeyEvent *event) Q_DECL_OVERRIDE; - void leaveEvent(QEvent *event) Q_DECL_OVERRIDE; - void mouseDoubleClickEvent(QMouseEvent *ev) Q_DECL_OVERRIDE; - void mousePressEvent(QMouseEvent *ev) Q_DECL_OVERRIDE; - void mouseReleaseEvent(QMouseEvent *ev) Q_DECL_OVERRIDE; - void mouseMoveEvent(QMouseEvent *ev) Q_DECL_OVERRIDE; - void wheelEvent(QWheelEvent *ev) Q_DECL_OVERRIDE; - bool focusNextPrevChild(bool next) Q_DECL_OVERRIDE; + bool event(QEvent *event) override; + void paintEvent(QPaintEvent *pe) override; + void showEvent(QShowEvent *event) override; + void hideEvent(QHideEvent *event) override; + void resizeEvent(QResizeEvent *event) override; + void contextMenuEvent(QContextMenuEvent *event) override; + void focusInEvent(QFocusEvent *event) override; + void focusOutEvent(QFocusEvent *event) override; + void keyPressEvent(QKeyEvent *event) override; + void keyReleaseEvent(QKeyEvent *event) override; + void leaveEvent(QEvent *event) override; + void mouseDoubleClickEvent(QMouseEvent *ev) override; + void mousePressEvent(QMouseEvent *ev) override; + void mouseReleaseEvent(QMouseEvent *ev) override; + void mouseMoveEvent(QMouseEvent *ev) override; + void wheelEvent(QWheelEvent *ev) override; + bool focusNextPrevChild(bool next) override; void fontChange(const QFont &); void extendSelection(const QPoint &position); // drag and drop - void dragEnterEvent(QDragEnterEvent *event) Q_DECL_OVERRIDE; - void dropEvent(QDropEvent *event) Q_DECL_OVERRIDE; + void dragEnterEvent(QDragEnterEvent *event) override; + void dropEvent(QDropEvent *event) override; void doDrag(); enum DragState { diNone, diPending, diDragging @@ -589,8 +589,8 @@ protected: void selectLine(QPoint pos, bool entireLine); // reimplemented - void inputMethodEvent(QInputMethodEvent *event) Q_DECL_OVERRIDE; - QVariant inputMethodQuery(Qt::InputMethodQuery query) const Q_DECL_OVERRIDE; + void inputMethodEvent(QInputMethodEvent *event) override; + QVariant inputMethodQuery(Qt::InputMethodQuery query) const override; void onColorsChanged(); @@ -874,8 +874,8 @@ class AutoScrollHandler : public QObject public: explicit AutoScrollHandler(QWidget *parent); protected: - void timerEvent(QTimerEvent *event) Q_DECL_OVERRIDE; - bool eventFilter(QObject *watched, QEvent *event) Q_DECL_OVERRIDE; + void timerEvent(QTimerEvent *event) override; + bool eventFilter(QObject *watched, QEvent *event) override; private: QWidget *widget() const { diff --git a/src/ViewContainer.h b/src/ViewContainer.h index 5932f3bc5..d96a0c925 100644 --- a/src/ViewContainer.h +++ b/src/ViewContainer.h @@ -68,7 +68,7 @@ public: * subclasses, use object->deleteLater() to delete any widgets or other objects * instead of 'delete object'. */ - ~TabbedViewContainer() Q_DECL_OVERRIDE; + ~TabbedViewContainer() override; /** Adds a new view to the container widget */ void addView(TerminalDisplay *view); @@ -201,7 +201,7 @@ protected: // close tabs and unregister void closeTerminalTab(int idx); - void keyReleaseEvent(QKeyEvent *event) Q_DECL_OVERRIDE; + void keyReleaseEvent(QKeyEvent *event) override; private Q_SLOTS: void viewDestroyed(QObject *view); void konsoleConfigChanged(); diff --git a/src/ViewManager.h b/src/ViewManager.h index cded6a385..6f5ea4e56 100644 --- a/src/ViewManager.h +++ b/src/ViewManager.h @@ -72,7 +72,7 @@ public: * and added to the specified @p collection. */ ViewManager(QObject *parent, KActionCollection *collection); - ~ViewManager() Q_DECL_OVERRIDE; + ~ViewManager() override; /** * Creates a new view to display the output from and deliver input to @p session. diff --git a/src/ViewProperties.h b/src/ViewProperties.h index c128605c2..22b0fafd6 100644 --- a/src/ViewProperties.h +++ b/src/ViewProperties.h @@ -43,7 +43,7 @@ class KONSOLEPRIVATE_EXPORT ViewProperties : public QObject public: explicit ViewProperties(QObject *parent); - ~ViewProperties() Q_DECL_OVERRIDE; + ~ViewProperties() override; /** Returns the icon associated with a view */ QIcon icon() const; diff --git a/src/Vt102Emulation.h b/src/Vt102Emulation.h index 7fa395d78..163f68c1f 100644 --- a/src/Vt102Emulation.h +++ b/src/Vt102Emulation.h @@ -80,27 +80,27 @@ class Vt102Emulation : public Emulation public: /** Constructs a new emulation */ Vt102Emulation(); - ~Vt102Emulation() Q_DECL_OVERRIDE; + ~Vt102Emulation() override; // reimplemented from Emulation - void clearEntireScreen() Q_DECL_OVERRIDE; - void reset() Q_DECL_OVERRIDE; - char eraseChar() const Q_DECL_OVERRIDE; + void clearEntireScreen() override; + void reset() override; + char eraseChar() const override; public Q_SLOTS: // reimplemented from Emulation - void sendString(const QByteArray &string) Q_DECL_OVERRIDE; - void sendText(const QString &text) Q_DECL_OVERRIDE; - void sendKeyEvent(QKeyEvent *) Q_DECL_OVERRIDE; - void sendMouseEvent(int buttons, int column, int line, int eventType) Q_DECL_OVERRIDE; - void focusLost() Q_DECL_OVERRIDE; - void focusGained() Q_DECL_OVERRIDE; + void sendString(const QByteArray &string) override; + void sendText(const QString &text) override; + void sendKeyEvent(QKeyEvent *) override; + void sendMouseEvent(int buttons, int column, int line, int eventType) override; + void focusLost() override; + void focusGained() override; protected: // reimplemented from Emulation - void setMode(int mode) Q_DECL_OVERRIDE; - void resetMode(int mode) Q_DECL_OVERRIDE; - void receiveChar(uint cc) Q_DECL_OVERRIDE; + void setMode(int mode) override; + void resetMode(int mode) override; + void receiveChar(uint cc) override; private Q_SLOTS: // Causes sessionAttributeChanged() to be emitted for each (int,QString) diff --git a/src/settings/GeneralSettings.h b/src/settings/GeneralSettings.h index 058a0772f..307f903d9 100644 --- a/src/settings/GeneralSettings.h +++ b/src/settings/GeneralSettings.h @@ -30,7 +30,7 @@ class GeneralSettings : public QWidget, private Ui::GeneralSettings public: explicit GeneralSettings(QWidget *aParent = nullptr); - ~GeneralSettings() Q_DECL_OVERRIDE; + ~GeneralSettings() override; public Q_SLOTS: void slotEnableAllMessages(); diff --git a/src/settings/PartInfo.h b/src/settings/PartInfo.h index 423d09b2f..f504a4bb6 100644 --- a/src/settings/PartInfo.h +++ b/src/settings/PartInfo.h @@ -30,7 +30,7 @@ class PartInfoSettings : public QWidget, private Ui::PartInfoSettings public: explicit PartInfoSettings(QWidget *parent = nullptr); - ~PartInfoSettings() Q_DECL_OVERRIDE; + ~PartInfoSettings() override; }; } diff --git a/src/settings/ProfileSettings.h b/src/settings/ProfileSettings.h index 66b093668..1e1d93f36 100644 --- a/src/settings/ProfileSettings.h +++ b/src/settings/ProfileSettings.h @@ -50,7 +50,7 @@ class ProfileSettings : public QWidget, private Ui::ProfileSettings public: /** Constructs a new profile type with the specified parent. */ explicit ProfileSettings(QWidget *parent = nullptr); - ~ProfileSettings() Q_DECL_OVERRIDE; + ~ProfileSettings() override; /** * Specifies whether the shortcut editor should be show. @@ -132,7 +132,7 @@ public: explicit FilteredKeySequenceEdit(QWidget *parent = nullptr): QKeySequenceEdit(parent) {} protected: - void keyPressEvent(QKeyEvent *event) Q_DECL_OVERRIDE; + void keyPressEvent(QKeyEvent *event) override; }; class ShortcutItemDelegate : public QStyledItemDelegate @@ -143,14 +143,14 @@ public: explicit ShortcutItemDelegate(QObject *parent = nullptr); void setModelData(QWidget *editor, QAbstractItemModel *model, - const QModelIndex &index) const Q_DECL_OVERRIDE; + const QModelIndex &index) const override; QWidget *createEditor(QWidget *parent, const QStyleOptionViewItem &option, - const QModelIndex &index) const Q_DECL_OVERRIDE; + const QModelIndex &index) const override; void paint(QPainter *painter, const QStyleOptionViewItem &option, - const QModelIndex &index) const Q_DECL_OVERRIDE; + const QModelIndex &index) const override; QSize sizeHint(const QStyleOptionViewItem &option, - const QModelIndex &index) const Q_DECL_OVERRIDE; - void destroyEditor(QWidget *editor, const QModelIndex &index) const Q_DECL_OVERRIDE; + const QModelIndex &index) const override; + void destroyEditor(QWidget *editor, const QModelIndex &index) const override; private Q_SLOTS: void editorModified(); diff --git a/src/settings/TabBarSettings.h b/src/settings/TabBarSettings.h index 220347f21..53fe21931 100644 --- a/src/settings/TabBarSettings.h +++ b/src/settings/TabBarSettings.h @@ -30,7 +30,7 @@ class TabBarSettings : public QWidget, private Ui::TabBarSettings public: explicit TabBarSettings(QWidget *parent = nullptr); - ~TabBarSettings() Q_DECL_OVERRIDE; + ~TabBarSettings() override; }; }