changeset 95:8043152ef9d4

include: set classes as final where appropriate
author Paper <mrpapersonic@gmail.com>
date Wed, 01 Nov 2023 14:39:43 -0400
parents 2f373d48f889
children bd68e4393e6f
files include/gui/dialog/about.h include/gui/dialog/information.h include/gui/dialog/settings.h include/gui/pages/anime_list.h include/gui/pages/history.h include/gui/pages/now_playing.h include/gui/pages/search.h include/gui/pages/seasons.h include/gui/pages/statistics.h include/gui/pages/torrents.h include/gui/widgets/anime_info.h include/gui/widgets/clickable_label.h include/gui/widgets/optional_date.h include/gui/widgets/poster.h include/gui/widgets/sidebar.h include/gui/widgets/text.h include/gui/window.h
diffstat 17 files changed, 26 insertions(+), 28 deletions(-) [+]
line wrap: on
line diff
--- a/include/gui/dialog/about.h	Wed Nov 01 14:30:26 2023 -0400
+++ b/include/gui/dialog/about.h	Wed Nov 01 14:39:43 2023 -0400
@@ -3,7 +3,7 @@
 
 #include <QDialog>
 
-class AboutWindow : public QDialog {
+class AboutWindow final : public QDialog {
 	public:
 		AboutWindow(QWidget* parent = nullptr);
 };
--- a/include/gui/dialog/information.h	Wed Nov 01 14:30:26 2023 -0400
+++ b/include/gui/dialog/information.h	Wed Nov 01 14:39:43 2023 -0400
@@ -6,7 +6,7 @@
 #include <QDialog>
 #include <functional>
 
-class InformationDialog : public QDialog {
+class InformationDialog final : public QDialog {
 		Q_OBJECT
 
 	public:
--- a/include/gui/dialog/settings.h	Wed Nov 01 14:30:26 2023 -0400
+++ b/include/gui/dialog/settings.h	Wed Nov 01 14:39:43 2023 -0400
@@ -24,7 +24,7 @@
 		QTabWidget* tab_widget;
 };
 
-class SettingsPageServices : public SettingsPage {
+class SettingsPageServices final : public SettingsPage {
 	public:
 		SettingsPageServices(QWidget* parent = nullptr);
 		void SaveInfo() override;
@@ -36,7 +36,7 @@
 		Anime::Services service;
 };
 
-class SettingsPageApplication : public SettingsPage {
+class SettingsPageApplication final : public SettingsPage {
 	public:
 		SettingsPageApplication(QWidget* parent = nullptr);
 		void SaveInfo() override;
@@ -50,7 +50,7 @@
 		bool highlighted_anime_above_others;
 };
 
-class SettingsDialog : public QDialog {
+class SettingsDialog final : public QDialog {
 		Q_OBJECT
 
 	public:
--- a/include/gui/pages/anime_list.h	Wed Nov 01 14:30:26 2023 -0400
+++ b/include/gui/pages/anime_list.h	Wed Nov 01 14:39:43 2023 -0400
@@ -11,7 +11,7 @@
 class QTreeView;
 class QTabBar;
 
-class AnimeListPageDelegate : public QStyledItemDelegate {
+class AnimeListPageDelegate final : public QStyledItemDelegate {
 		Q_OBJECT
 
 	public:
@@ -21,7 +21,7 @@
 		void paint(QPainter* painter, const QStyleOptionViewItem& option, const QModelIndex& index) const override;
 };
 
-class AnimeListPageSortFilter : public QSortFilterProxyModel {
+class AnimeListPageSortFilter final : public QSortFilterProxyModel {
 		Q_OBJECT
 
 	public:
@@ -31,7 +31,7 @@
 		bool lessThan(const QModelIndex& l, const QModelIndex& r) const override;
 };
 
-class AnimeListPageModel : public QAbstractListModel {
+class AnimeListPageModel final : public QAbstractListModel {
 		Q_OBJECT
 
 	public:
@@ -67,7 +67,7 @@
 
 /* todo: rename these to "page" or something more
    sensible than "widget" */
-class AnimeListPage : public QWidget {
+class AnimeListPage final : public QWidget {
 		Q_OBJECT
 
 	public:
--- a/include/gui/pages/history.h	Wed Nov 01 14:30:26 2023 -0400
+++ b/include/gui/pages/history.h	Wed Nov 01 14:39:43 2023 -0400
@@ -3,7 +3,7 @@
 
 #include <QWidget>
 
-class HistoryPage : public QWidget {
+class HistoryPage final : public QWidget {
 		Q_OBJECT
 
 	public:
--- a/include/gui/pages/now_playing.h	Wed Nov 01 14:30:26 2023 -0400
+++ b/include/gui/pages/now_playing.h	Wed Nov 01 14:39:43 2023 -0400
@@ -10,7 +10,7 @@
 class Anime;
 }
 
-class NowPlayingPage : public QFrame {
+class NowPlayingPage final : public QFrame {
 		Q_OBJECT
 
 	public:
--- a/include/gui/pages/search.h	Wed Nov 01 14:30:26 2023 -0400
+++ b/include/gui/pages/search.h	Wed Nov 01 14:39:43 2023 -0400
@@ -2,7 +2,7 @@
 #define __gui__pages__search_h
 #include <QWidget>
 
-class SearchPage : public QWidget {
+class SearchPage final : public QWidget {
 		Q_OBJECT
 
 	public:
--- a/include/gui/pages/seasons.h	Wed Nov 01 14:30:26 2023 -0400
+++ b/include/gui/pages/seasons.h	Wed Nov 01 14:39:43 2023 -0400
@@ -3,7 +3,7 @@
 
 #include <QWidget>
 
-class SeasonsPage : public QWidget {
+class SeasonsPage final : public QWidget {
 		Q_OBJECT
 
 	public:
--- a/include/gui/pages/statistics.h	Wed Nov 01 14:30:26 2023 -0400
+++ b/include/gui/pages/statistics.h	Wed Nov 01 14:39:43 2023 -0400
@@ -9,7 +9,7 @@
 class LabelledSection;
 }
 
-class StatisticsPage : public QFrame {
+class StatisticsPage final : public QFrame {
 		Q_OBJECT
 
 	public:
@@ -24,9 +24,7 @@
 		std::string SecondsToDateString(int seconds);
 
 		std::shared_ptr<TextWidgets::LabelledSection> _anime_list;
-
 		std::shared_ptr<Graph<int>> _score_distribution_graph;
-
 		std::shared_ptr<TextWidgets::LabelledSection> _application;
 };
 
--- a/include/gui/pages/torrents.h	Wed Nov 01 14:30:26 2023 -0400
+++ b/include/gui/pages/torrents.h	Wed Nov 01 14:39:43 2023 -0400
@@ -3,7 +3,7 @@
 
 #include <QWidget>
 
-class TorrentsPage : public QWidget {
+class TorrentsPage final : public QWidget {
 		Q_OBJECT
 
 	public:
--- a/include/gui/widgets/anime_info.h	Wed Nov 01 14:30:26 2023 -0400
+++ b/include/gui/widgets/anime_info.h	Wed Nov 01 14:39:43 2023 -0400
@@ -13,7 +13,7 @@
 class Anime;
 }
 
-class AnimeInfoWidget : public QWidget {
+class AnimeInfoWidget final : public QWidget {
 		Q_OBJECT
 
 	public:
--- a/include/gui/widgets/clickable_label.h	Wed Nov 01 14:30:26 2023 -0400
+++ b/include/gui/widgets/clickable_label.h	Wed Nov 01 14:39:43 2023 -0400
@@ -3,7 +3,7 @@
 
 #include <QLabel>
 
-class ClickableLabel : public QLabel {
+class ClickableLabel final : public QLabel {
 		Q_OBJECT
 
 	public:
--- a/include/gui/widgets/optional_date.h	Wed Nov 01 14:30:26 2023 -0400
+++ b/include/gui/widgets/optional_date.h	Wed Nov 01 14:39:43 2023 -0400
@@ -8,7 +8,7 @@
 class QDateEdit;
 class QDate;
 
-class OptionalDate : public QWidget {
+class OptionalDate final : public QWidget {
 		Q_OBJECT
 
 	public:
--- a/include/gui/widgets/poster.h	Wed Nov 01 14:30:26 2023 -0400
+++ b/include/gui/widgets/poster.h	Wed Nov 01 14:39:43 2023 -0400
@@ -9,7 +9,7 @@
 class Anime;
 }
 
-class Poster : public QFrame {
+class Poster final : public QFrame {
 		Q_OBJECT
 
 	public:
--- a/include/gui/widgets/sidebar.h	Wed Nov 01 14:30:26 2023 -0400
+++ b/include/gui/widgets/sidebar.h	Wed Nov 01 14:39:43 2023 -0400
@@ -6,7 +6,7 @@
 
 class QListWidgetItem;
 
-class SideBar : public QListWidget {
+class SideBar final : public QListWidget {
 		Q_OBJECT
 
 	public:
--- a/include/gui/widgets/text.h	Wed Nov 01 14:30:26 2023 -0400
+++ b/include/gui/widgets/text.h	Wed Nov 01 14:39:43 2023 -0400
@@ -43,14 +43,14 @@
 		void SetText(const QString& text);
 };
 
-class Title : public Line {
+class Title final : public Line {
 		Q_OBJECT
 
 	public:
 		Title(const QString& title, QWidget* parent = nullptr);
 };
 
-class Section : public QWidget {
+class Section final : public QWidget {
 		Q_OBJECT
 
 	public:
@@ -63,7 +63,7 @@
 		Paragraph* paragraph;
 };
 
-class LabelledSection : public QWidget {
+class LabelledSection final : public QWidget {
 		Q_OBJECT
 
 	public:
@@ -78,7 +78,7 @@
 		Paragraph* paragraph;
 };
 
-class SelectableSection : public QWidget {
+class SelectableSection final : public QWidget {
 		Q_OBJECT
 
 	public:
@@ -91,7 +91,7 @@
 		Paragraph* paragraph;
 };
 
-class OneLineSection : public QWidget {
+class OneLineSection final : public QWidget {
 		Q_OBJECT
 
 	public:
--- a/include/gui/window.h	Wed Nov 01 14:30:26 2023 -0400
+++ b/include/gui/window.h	Wed Nov 01 14:39:43 2023 -0400
@@ -8,7 +8,7 @@
 class QCloseEvent;
 class SideBar;
 
-class MainWindow : public QMainWindow {
+class MainWindow final : public QMainWindow {
 		Q_OBJECT
 
 	public: