# HG changeset patch # User Paper # Date 1698863983 14400 # Node ID 8043152ef9d46c0c6af02ae366b9aa51fabd1953 # Parent 2f373d48f889f823c127dfb03bfeb9a5eab6687e include: set classes as final where appropriate diff -r 2f373d48f889 -r 8043152ef9d4 include/gui/dialog/about.h --- 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 -class AboutWindow : public QDialog { +class AboutWindow final : public QDialog { public: AboutWindow(QWidget* parent = nullptr); }; diff -r 2f373d48f889 -r 8043152ef9d4 include/gui/dialog/information.h --- 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 #include -class InformationDialog : public QDialog { +class InformationDialog final : public QDialog { Q_OBJECT public: diff -r 2f373d48f889 -r 8043152ef9d4 include/gui/dialog/settings.h --- 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: diff -r 2f373d48f889 -r 8043152ef9d4 include/gui/pages/anime_list.h --- 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: diff -r 2f373d48f889 -r 8043152ef9d4 include/gui/pages/history.h --- 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 -class HistoryPage : public QWidget { +class HistoryPage final : public QWidget { Q_OBJECT public: diff -r 2f373d48f889 -r 8043152ef9d4 include/gui/pages/now_playing.h --- 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: diff -r 2f373d48f889 -r 8043152ef9d4 include/gui/pages/search.h --- 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 -class SearchPage : public QWidget { +class SearchPage final : public QWidget { Q_OBJECT public: diff -r 2f373d48f889 -r 8043152ef9d4 include/gui/pages/seasons.h --- 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 -class SeasonsPage : public QWidget { +class SeasonsPage final : public QWidget { Q_OBJECT public: diff -r 2f373d48f889 -r 8043152ef9d4 include/gui/pages/statistics.h --- 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 _anime_list; - std::shared_ptr> _score_distribution_graph; - std::shared_ptr _application; }; diff -r 2f373d48f889 -r 8043152ef9d4 include/gui/pages/torrents.h --- 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 -class TorrentsPage : public QWidget { +class TorrentsPage final : public QWidget { Q_OBJECT public: diff -r 2f373d48f889 -r 8043152ef9d4 include/gui/widgets/anime_info.h --- 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: diff -r 2f373d48f889 -r 8043152ef9d4 include/gui/widgets/clickable_label.h --- 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 -class ClickableLabel : public QLabel { +class ClickableLabel final : public QLabel { Q_OBJECT public: diff -r 2f373d48f889 -r 8043152ef9d4 include/gui/widgets/optional_date.h --- 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: diff -r 2f373d48f889 -r 8043152ef9d4 include/gui/widgets/poster.h --- 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: diff -r 2f373d48f889 -r 8043152ef9d4 include/gui/widgets/sidebar.h --- 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: diff -r 2f373d48f889 -r 8043152ef9d4 include/gui/widgets/text.h --- 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: diff -r 2f373d48f889 -r 8043152ef9d4 include/gui/window.h --- 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: