From 4e53ef2a62b2b6b4f103b016bf2f4260a9c02ad4 Mon Sep 17 00:00:00 2001 From: Manuel Nickschas Date: Tue, 27 Sep 2016 23:03:30 +0200 Subject: [PATCH] Use override in a few more places to avoid compiler warnings Clang complains about inconsistent use of virtual and override, and for some reason the only offender when building against Qt 5 was multilineedit.h. This commit fixes the ungodly amount of warnings that that one header produced. When building against Qt 4 we still get warnings from the various application classes; however fixing them triggers a million new warnings related to Q_OBJECT which is beyond our control, so we'll just have to wait until we can finally deprecate support for Qt 4 for good... --- src/uisupport/multilineedit.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/uisupport/multilineedit.h b/src/uisupport/multilineedit.h index e6b58e17..70e55800 100644 --- a/src/uisupport/multilineedit.h +++ b/src/uisupport/multilineedit.h @@ -61,8 +61,8 @@ public: inline bool isSingleLine() const { return _singleLine; } inline bool pasteProtectionEnabled() const { return _pasteProtectionEnabled; } - virtual QSize sizeHint() const; - virtual QSize minimumSizeHint() const; + QSize sizeHint() const override; + QSize minimumSizeHint() const override; inline QString mircColorFromRGB(QString rgbColor) const { return _mircColorMap.key(rgbColor); } inline QString rgbColorFromMirc(QString mircColor) const { return _mircColorMap[mircColor]; } @@ -75,7 +75,7 @@ public: void addCompletionSpace(); #if defined HAVE_KF5 || defined HAVE_KDE4 - virtual void createHighlighter() override; + void createHighlighter() override; #endif public slots: @@ -97,9 +97,9 @@ signals: void noTextEntered(); protected: - virtual bool event(QEvent *e); - virtual void keyPressEvent(QKeyEvent *event); - virtual void resizeEvent(QResizeEvent *event); + bool event(QEvent *e) override; + void keyPressEvent(QKeyEvent *event) override; + void resizeEvent(QResizeEvent *event) override; private slots: void on_returnPressed(); -- 2.20.1