From 2126be6d6d401b79c9ca3c65cccd100a772b7d9f Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Tue, 22 Sep 2020 22:34:38 +0200 Subject: [PATCH] Warnings-- (~T() override) Consistently use ~T() override; in class declarations (so no virtual in front, and avoid warnings due to the missing override in back). --- src/calamares/CalamaresApplication.h | 2 +- src/libcalamares/CppJob.h | 2 +- src/libcalamares/Job.h | 2 +- src/libcalamares/JobQueue.cpp | 2 +- src/libcalamares/JobQueue.h | 2 +- src/libcalamares/PythonHelper.h | 2 +- src/libcalamares/locale/LabelModel.h | 2 +- src/libcalamares/locale/TimeZone.h | 4 ++-- src/libcalamares/network/Manager.h | 2 +- src/libcalamares/utils/CalamaresUtilsSystem.h | 2 +- src/libcalamares/utils/PluginFactory.h | 2 +- src/libcalamaresui/viewpages/Slideshow.h | 2 +- src/libcalamaresui/widgets/PrettyRadioButton.h | 2 +- src/modules/keyboard/KeyboardPage.cpp | 2 +- src/modules/keyboard/KeyboardPage.h | 2 +- src/modules/keyboard/keyboardwidget/keyboardpreview.h | 4 ++-- src/modules/locale/Config.h | 2 +- src/modules/locale/LocalePage.h | 2 +- src/modules/locale/timezonewidget/timezonewidget.h | 4 ++-- src/modules/netinstall/Config.h | 2 +- src/modules/netinstall/NetInstallPage.h | 2 +- src/modules/tracking/Config.h | 2 +- src/modules/users/Config.h | 2 +- src/modules/users/UsersPage.h | 2 +- src/modules/welcome/checker/CheckerContainer.h | 2 +- src/modules/welcome/checker/ResultsListWidget.cpp | 2 +- 26 files changed, 29 insertions(+), 29 deletions(-) diff --git a/src/calamares/CalamaresApplication.h b/src/calamares/CalamaresApplication.h index e7dea4c61..5f0037971 100644 --- a/src/calamares/CalamaresApplication.h +++ b/src/calamares/CalamaresApplication.h @@ -30,7 +30,7 @@ class CalamaresApplication : public QApplication Q_OBJECT public: CalamaresApplication( int& argc, char* argv[] ); - virtual ~CalamaresApplication(); + ~CalamaresApplication() override; /** * @brief init handles the first part of Calamares application startup. diff --git a/src/libcalamares/CppJob.h b/src/libcalamares/CppJob.h index 7569debe9..f906a0dca 100644 --- a/src/libcalamares/CppJob.h +++ b/src/libcalamares/CppJob.h @@ -28,7 +28,7 @@ class DLLEXPORT CppJob : public Job Q_OBJECT public: explicit CppJob( QObject* parent = nullptr ); - virtual ~CppJob(); + ~CppJob() override; void setModuleInstanceKey( const Calamares::ModuleSystem::InstanceKey& instanceKey ); Calamares::ModuleSystem::InstanceKey moduleInstanceKey() const { return m_instanceKey; } diff --git a/src/libcalamares/Job.h b/src/libcalamares/Job.h index ed349ab30..c7578272d 100644 --- a/src/libcalamares/Job.h +++ b/src/libcalamares/Job.h @@ -86,7 +86,7 @@ class DLLEXPORT Job : public QObject Q_OBJECT public: explicit Job( QObject* parent = nullptr ); - virtual ~Job(); + ~Job() override; /** @brief The job's (relative) weight. * diff --git a/src/libcalamares/JobQueue.cpp b/src/libcalamares/JobQueue.cpp index 17ea6a141..2b17b64bd 100644 --- a/src/libcalamares/JobQueue.cpp +++ b/src/libcalamares/JobQueue.cpp @@ -53,7 +53,7 @@ public: { } - virtual ~JobThread() override; + ~JobThread() override; void finalize() { diff --git a/src/libcalamares/JobQueue.h b/src/libcalamares/JobQueue.h index 5c4c6c35f..92468d535 100644 --- a/src/libcalamares/JobQueue.h +++ b/src/libcalamares/JobQueue.h @@ -25,7 +25,7 @@ class DLLEXPORT JobQueue : public QObject Q_OBJECT public: explicit JobQueue( QObject* parent = nullptr ); - virtual ~JobQueue(); + ~JobQueue() override; static JobQueue* instance(); diff --git a/src/libcalamares/PythonHelper.h b/src/libcalamares/PythonHelper.h index c439f4619..0a2127fb0 100644 --- a/src/libcalamares/PythonHelper.h +++ b/src/libcalamares/PythonHelper.h @@ -48,7 +48,7 @@ public: static Helper* instance(); private: - virtual ~Helper(); + ~Helper() override; explicit Helper(); boost::python::object m_mainModule; diff --git a/src/libcalamares/locale/LabelModel.h b/src/libcalamares/locale/LabelModel.h index 8648dc71c..7e6f2dacc 100644 --- a/src/libcalamares/locale/LabelModel.h +++ b/src/libcalamares/locale/LabelModel.h @@ -36,7 +36,7 @@ public: }; LabelModel( const QStringList& locales, QObject* parent = nullptr ); - virtual ~LabelModel() override; + ~LabelModel() override; int rowCount( const QModelIndex& parent ) const override; diff --git a/src/libcalamares/locale/TimeZone.h b/src/libcalamares/locale/TimeZone.h index 8c16517c7..e02612f5e 100644 --- a/src/libcalamares/locale/TimeZone.h +++ b/src/libcalamares/locale/TimeZone.h @@ -94,7 +94,7 @@ public: }; RegionsModel( QObject* parent = nullptr ); - virtual ~RegionsModel() override; + ~RegionsModel() override; int rowCount( const QModelIndex& parent ) const override; QVariant data( const QModelIndex& index, int role ) const override; @@ -126,7 +126,7 @@ public: }; ZonesModel( QObject* parent = nullptr ); - virtual ~ZonesModel() override; + ~ZonesModel() override; int rowCount( const QModelIndex& parent ) const override; QVariant data( const QModelIndex& index, int role ) const override; diff --git a/src/libcalamares/network/Manager.h b/src/libcalamares/network/Manager.h index b3a1e23e7..930638198 100644 --- a/src/libcalamares/network/Manager.h +++ b/src/libcalamares/network/Manager.h @@ -99,7 +99,7 @@ public: * to keep the reference. */ static Manager& instance(); - virtual ~Manager(); + virtual ~Manager() override; /** @brief Checks if the given @p url returns data. * diff --git a/src/libcalamares/utils/CalamaresUtilsSystem.h b/src/libcalamares/utils/CalamaresUtilsSystem.h index 61aebc58d..7d60a3577 100644 --- a/src/libcalamares/utils/CalamaresUtilsSystem.h +++ b/src/libcalamares/utils/CalamaresUtilsSystem.h @@ -126,7 +126,7 @@ public: * @param parent the QObject parent. */ explicit System( bool doChroot, QObject* parent = nullptr ); - virtual ~System(); + virtual ~System() override; static System* instance(); diff --git a/src/libcalamares/utils/PluginFactory.h b/src/libcalamares/utils/PluginFactory.h index 891e3c1cd..a3371dd72 100644 --- a/src/libcalamares/utils/PluginFactory.h +++ b/src/libcalamares/utils/PluginFactory.h @@ -88,7 +88,7 @@ public: Q_PLUGIN_METADATA( IID CalamaresPluginFactory_iid ) \ public: \ explicit name(); \ - ~name(); \ + ~name() override; \ }; #define CALAMARES_PLUGIN_FACTORY_DEFINITION( name, pluginRegistrations ) \ K_PLUGIN_FACTORY_DEFINITION_WITH_BASEFACTORY( name, CalamaresPluginFactory, pluginRegistrations ) diff --git a/src/libcalamaresui/viewpages/Slideshow.h b/src/libcalamaresui/viewpages/Slideshow.h index 4432eed7b..9796ceea7 100644 --- a/src/libcalamaresui/viewpages/Slideshow.h +++ b/src/libcalamaresui/viewpages/Slideshow.h @@ -52,7 +52,7 @@ public: : QObject( parent ) { } - virtual ~Slideshow(); + ~Slideshow() override; /// @brief Is the slideshow being shown **right now**? bool isActive() const { return m_state == Start; } diff --git a/src/libcalamaresui/widgets/PrettyRadioButton.h b/src/libcalamaresui/widgets/PrettyRadioButton.h index 6b158f353..1874457a8 100644 --- a/src/libcalamaresui/widgets/PrettyRadioButton.h +++ b/src/libcalamaresui/widgets/PrettyRadioButton.h @@ -38,7 +38,7 @@ class UIDLLEXPORT PrettyRadioButton : public QWidget Q_OBJECT public: explicit PrettyRadioButton( QWidget* parent = nullptr ); - virtual ~PrettyRadioButton() {} + ~PrettyRadioButton() override {} /// @brief Passes @p text on to the ClickableLabel void setText( const QString& text ); diff --git a/src/modules/keyboard/KeyboardPage.cpp b/src/modules/keyboard/KeyboardPage.cpp index 66f4c7570..56036001f 100644 --- a/src/modules/keyboard/KeyboardPage.cpp +++ b/src/modules/keyboard/KeyboardPage.cpp @@ -35,7 +35,7 @@ class LayoutItem : public QListWidgetItem public: QString data; - virtual ~LayoutItem(); + ~LayoutItem() override; }; LayoutItem::~LayoutItem() {} diff --git a/src/modules/keyboard/KeyboardPage.h b/src/modules/keyboard/KeyboardPage.h index 485e27ed6..4faeebd57 100644 --- a/src/modules/keyboard/KeyboardPage.h +++ b/src/modules/keyboard/KeyboardPage.h @@ -34,7 +34,7 @@ class KeyboardPage : public QWidget Q_OBJECT public: explicit KeyboardPage( QWidget* parent = nullptr ); - virtual ~KeyboardPage(); + ~KeyboardPage() override; void init(); diff --git a/src/modules/keyboard/keyboardwidget/keyboardpreview.h b/src/modules/keyboard/keyboardwidget/keyboardpreview.h index 1a01fe1a2..6b56e4120 100644 --- a/src/modules/keyboard/keyboardwidget/keyboardpreview.h +++ b/src/modules/keyboard/keyboardwidget/keyboardpreview.h @@ -71,8 +71,8 @@ private: QString fromUnicodeString( QString raw ); protected: - void paintEvent( QPaintEvent* event ); - void resizeEvent( QResizeEvent* event ); + void paintEvent( QPaintEvent* event ) override; + void resizeEvent( QResizeEvent* event ) override; }; #endif // KEYBOARDPREVIEW_H diff --git a/src/modules/locale/Config.h b/src/modules/locale/Config.h index a7ae0ccaf..4383f6bb0 100644 --- a/src/modules/locale/Config.h +++ b/src/modules/locale/Config.h @@ -52,7 +52,7 @@ class Config : public QObject public: Config( QObject* parent = nullptr ); - ~Config(); + ~Config() override; void setConfigurationMap( const QVariantMap& ); void finalizeGlobalStorage() const; diff --git a/src/modules/locale/LocalePage.h b/src/modules/locale/LocalePage.h index c8b80e906..3b76b77b7 100644 --- a/src/modules/locale/LocalePage.h +++ b/src/modules/locale/LocalePage.h @@ -32,7 +32,7 @@ class LocalePage : public QWidget Q_OBJECT public: explicit LocalePage( class Config* config, QWidget* parent = nullptr ); - virtual ~LocalePage(); + ~LocalePage() override; void onActivate(); diff --git a/src/modules/locale/timezonewidget/timezonewidget.h b/src/modules/locale/timezonewidget/timezonewidget.h index 3a2911597..7ccfb2b80 100644 --- a/src/modules/locale/timezonewidget/timezonewidget.h +++ b/src/modules/locale/timezonewidget/timezonewidget.h @@ -66,8 +66,8 @@ private: const CalamaresUtils::Locale::ZonesModel* m_zonesData; const TimeZoneData* m_currentLocation = nullptr; // Not owned by me - void paintEvent( QPaintEvent* event ); - void mousePressEvent( QMouseEvent* event ); + void paintEvent( QPaintEvent* event ) override; + void mousePressEvent( QMouseEvent* event ) override; }; #endif // TIMEZONEWIDGET_H diff --git a/src/modules/netinstall/Config.h b/src/modules/netinstall/Config.h index 56cbd784b..13eb098c6 100644 --- a/src/modules/netinstall/Config.h +++ b/src/modules/netinstall/Config.h @@ -28,7 +28,7 @@ class Config : public QObject public: Config( QObject* parent = nullptr ); - virtual ~Config(); + ~Config() override; enum class Status { diff --git a/src/modules/netinstall/NetInstallPage.h b/src/modules/netinstall/NetInstallPage.h index 167f9807f..1c97423da 100644 --- a/src/modules/netinstall/NetInstallPage.h +++ b/src/modules/netinstall/NetInstallPage.h @@ -35,7 +35,7 @@ class NetInstallPage : public QWidget Q_OBJECT public: NetInstallPage( Config* config, QWidget* parent = nullptr ); - virtual ~NetInstallPage(); + ~NetInstallPage() override; /** @brief Sets the page title * diff --git a/src/modules/tracking/Config.h b/src/modules/tracking/Config.h index 655a71410..c91d430f5 100644 --- a/src/modules/tracking/Config.h +++ b/src/modules/tracking/Config.h @@ -36,7 +36,7 @@ class TrackingStyleConfig : public QObject public: TrackingStyleConfig( QObject* parent ); - virtual ~TrackingStyleConfig(); + ~TrackingStyleConfig() override; void setConfigurationMap( const QVariantMap& ); diff --git a/src/modules/users/Config.h b/src/modules/users/Config.h index 33e82cd89..e4057941c 100644 --- a/src/modules/users/Config.h +++ b/src/modules/users/Config.h @@ -104,7 +104,7 @@ public: using PasswordStatus = QPair< PasswordValidity, QString >; Config( QObject* parent = nullptr ); - ~Config(); + ~Config() override; void setConfigurationMap( const QVariantMap& ); diff --git a/src/modules/users/UsersPage.h b/src/modules/users/UsersPage.h index f4d2c47d4..ed537540c 100644 --- a/src/modules/users/UsersPage.h +++ b/src/modules/users/UsersPage.h @@ -32,7 +32,7 @@ class UsersPage : public QWidget Q_OBJECT public: explicit UsersPage( Config* config, QWidget* parent = nullptr ); - virtual ~UsersPage(); + ~UsersPage() override; void onActivate(); diff --git a/src/modules/welcome/checker/CheckerContainer.h b/src/modules/welcome/checker/CheckerContainer.h index c721f2b36..93b75ac04 100644 --- a/src/modules/welcome/checker/CheckerContainer.h +++ b/src/modules/welcome/checker/CheckerContainer.h @@ -32,7 +32,7 @@ class CheckerContainer : public QWidget Q_OBJECT public: explicit CheckerContainer( const Calamares::RequirementsModel& model, QWidget* parent = nullptr ); - virtual ~CheckerContainer(); + ~CheckerContainer() override; bool verdict() const; diff --git a/src/modules/welcome/checker/ResultsListWidget.cpp b/src/modules/welcome/checker/ResultsListWidget.cpp index 1ad2c1b29..b0e8a175e 100644 --- a/src/modules/welcome/checker/ResultsListWidget.cpp +++ b/src/modules/welcome/checker/ResultsListWidget.cpp @@ -87,7 +87,7 @@ public: * or UB happens. */ ResultsListDialog( const Calamares::RequirementsModel& model, QWidget* parent ); - virtual ~ResultsListDialog(); + ~ResultsListDialog() override; private: QLabel* m_title;