Browse Source

Merge pull request #12544 from Chocobo1/final

Add final specifier to GUI classes
adaptive-webui-19844
Mike Tzou 5 years ago committed by GitHub
parent
commit
e05ef12e68
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      src/gui/addnewtorrentdialog.h
  2. 2
      src/gui/autoexpandabledialog.h
  3. 2
      src/gui/categoryfiltermodel.h
  4. 2
      src/gui/categoryfilterproxymodel.h
  5. 2
      src/gui/categoryfilterwidget.h
  6. 2
      src/gui/cookiesdialog.h
  7. 2
      src/gui/cookiesmodel.h
  8. 4
      src/gui/fspathedit.h
  9. 2
      src/gui/hidabletabwidget.h
  10. 2
      src/gui/lineedit.h
  11. 2
      src/gui/log/logfiltermodel.h
  12. 2
      src/gui/log/loglistview.cpp
  13. 2
      src/gui/log/loglistview.h
  14. 2
      src/gui/mainwindow.h
  15. 2
      src/gui/optionsdialog.cpp
  16. 2
      src/gui/optionsdialog.h
  17. 2
      src/gui/previewlistdelegate.h
  18. 2
      src/gui/previewselectdialog.h
  19. 6
      src/gui/private/fspathedit_p.h
  20. 2
      src/gui/private/tristatewidget.h
  21. 2
      src/gui/properties/downloadedpiecesbar.h
  22. 2
      src/gui/properties/peerlistsortmodel.h
  23. 2
      src/gui/properties/peerlistwidget.h
  24. 2
      src/gui/properties/pieceavailabilitybar.h
  25. 2
      src/gui/properties/proplistdelegate.h
  26. 2
      src/gui/properties/speedplotview.h
  27. 2
      src/gui/properties/speedwidget.h
  28. 2
      src/gui/raisedmessagebox.h
  29. 2
      src/gui/rss/feedlistwidget.h
  30. 4
      src/gui/rss/htmlbrowser.h
  31. 2
      src/gui/scanfoldersdelegate.h
  32. 2
      src/gui/search/pluginselectdialog.h
  33. 2
      src/gui/search/searchjobwidget.h
  34. 2
      src/gui/search/searchlistdelegate.h
  35. 2
      src/gui/search/searchsortmodel.h
  36. 2
      src/gui/shutdownconfirmdialog.h
  37. 2
      src/gui/tagfiltermodel.h
  38. 2
      src/gui/tagfilterproxymodel.h
  39. 2
      src/gui/tagfilterwidget.h
  40. 2
      src/gui/torrentcontentfiltermodel.h
  41. 2
      src/gui/torrentcontentmodel.cpp
  42. 2
      src/gui/torrentcontentmodel.h
  43. 2
      src/gui/torrentcontentmodelfile.h
  44. 2
      src/gui/torrentcontentmodelfolder.h
  45. 2
      src/gui/torrentcontenttreeview.h
  46. 2
      src/gui/torrentcreatordialog.h
  47. 2
      src/gui/transferlistdelegate.h
  48. 2
      src/gui/transferlistfilterswidget.cpp
  49. 4
      src/gui/transferlistfilterswidget.h
  50. 2
      src/gui/transferlistmodel.h
  51. 2
      src/gui/transferlistsortmodel.h
  52. 2
      src/gui/transferlistwidget.h
  53. 2
      src/gui/updownratiodialog.h

2
src/gui/addnewtorrentdialog.h

@ -57,7 +57,7 @@ class PropListDelegate;
class TorrentContentFilterModel; class TorrentContentFilterModel;
class TorrentFileGuard; class TorrentFileGuard;
class AddNewTorrentDialog : public QDialog class AddNewTorrentDialog final : public QDialog
{ {
Q_OBJECT Q_OBJECT
Q_DISABLE_COPY(AddNewTorrentDialog) Q_DISABLE_COPY(AddNewTorrentDialog)

2
src/gui/autoexpandabledialog.h

@ -39,7 +39,7 @@ namespace Ui
class AutoExpandableDialog; class AutoExpandableDialog;
} }
class AutoExpandableDialog : public QDialog class AutoExpandableDialog final : public QDialog
{ {
Q_OBJECT Q_OBJECT

2
src/gui/categoryfiltermodel.h

@ -40,7 +40,7 @@ namespace BitTorrent
class TorrentHandle; class TorrentHandle;
} }
class CategoryFilterModel : public QAbstractItemModel class CategoryFilterModel final : public QAbstractItemModel
{ {
Q_OBJECT Q_OBJECT

2
src/gui/categoryfilterproxymodel.h

@ -33,7 +33,7 @@
class QString; class QString;
class CategoryFilterProxyModel : public QSortFilterProxyModel class CategoryFilterProxyModel final : public QSortFilterProxyModel
{ {
public: public:
explicit CategoryFilterProxyModel(QObject *parent = nullptr); explicit CategoryFilterProxyModel(QObject *parent = nullptr);

2
src/gui/categoryfilterwidget.h

@ -30,7 +30,7 @@
#include <QTreeView> #include <QTreeView>
class CategoryFilterWidget : public QTreeView class CategoryFilterWidget final : public QTreeView
{ {
Q_OBJECT Q_OBJECT
Q_DISABLE_COPY(CategoryFilterWidget) Q_DISABLE_COPY(CategoryFilterWidget)

2
src/gui/cookiesdialog.h

@ -38,7 +38,7 @@ namespace Ui
class CookiesDialog; class CookiesDialog;
} }
class CookiesDialog : public QDialog class CookiesDialog final : public QDialog
{ {
Q_OBJECT Q_OBJECT

2
src/gui/cookiesmodel.h

@ -33,7 +33,7 @@
#include <QList> #include <QList>
#include <QNetworkCookie> #include <QNetworkCookie>
class CookiesModel : public QAbstractItemModel class CookiesModel final : public QAbstractItemModel
{ {
Q_OBJECT Q_OBJECT

4
src/gui/fspathedit.h

@ -108,7 +108,7 @@ private:
}; };
/// Widget which uses QLineEdit for path editing /// Widget which uses QLineEdit for path editing
class FileSystemPathLineEdit : public FileSystemPathEdit class FileSystemPathLineEdit final : public FileSystemPathEdit
{ {
using base = FileSystemPathEdit; using base = FileSystemPathEdit;
using WidgetType = Private::FileLineEdit; using WidgetType = Private::FileLineEdit;
@ -124,7 +124,7 @@ private:
}; };
/// Widget which uses QComboBox for path editing /// Widget which uses QComboBox for path editing
class FileSystemPathComboEdit : public FileSystemPathEdit class FileSystemPathComboEdit final : public FileSystemPathEdit
{ {
using base = FileSystemPathEdit; using base = FileSystemPathEdit;
using WidgetType = Private::FileComboEdit; using WidgetType = Private::FileComboEdit;

2
src/gui/hidabletabwidget.h

@ -35,7 +35,7 @@
class QPaintEvent; class QPaintEvent;
#endif #endif
class HidableTabWidget : public QTabWidget class HidableTabWidget final : public QTabWidget
{ {
public: public:
explicit HidableTabWidget(QWidget *parent = nullptr); explicit HidableTabWidget(QWidget *parent = nullptr);

2
src/gui/lineedit.h

@ -14,7 +14,7 @@
class QToolButton; class QToolButton;
class LineEdit : public QLineEdit class LineEdit final : public QLineEdit
{ {
Q_OBJECT Q_OBJECT

2
src/gui/log/logfiltermodel.h

@ -32,7 +32,7 @@
#include "base/logger.h" #include "base/logger.h"
class LogFilterModel : public QSortFilterProxyModel class LogFilterModel final : public QSortFilterProxyModel
{ {
Q_OBJECT Q_OBJECT
Q_DISABLE_COPY(LogFilterModel) Q_DISABLE_COPY(LogFilterModel)

2
src/gui/log/loglistview.cpp

@ -59,7 +59,7 @@ namespace
, index.data(BaseLogModel::MessageRole).toString()); , index.data(BaseLogModel::MessageRole).toString());
} }
class LogItemDelegate : public QStyledItemDelegate class LogItemDelegate final : public QStyledItemDelegate
{ {
public: public:
using QStyledItemDelegate::QStyledItemDelegate; using QStyledItemDelegate::QStyledItemDelegate;

2
src/gui/log/loglistview.h

@ -31,7 +31,7 @@
#include <QListView> #include <QListView>
class LogListView : public QListView class LogListView final : public QListView
{ {
Q_OBJECT Q_OBJECT
Q_DISABLE_COPY(LogListView) Q_DISABLE_COPY(LogListView)

2
src/gui/mainwindow.h

@ -72,7 +72,7 @@ namespace Ui
class MainWindow; class MainWindow;
} }
class MainWindow : public QMainWindow class MainWindow final : public QMainWindow
{ {
Q_OBJECT Q_OBJECT

2
src/gui/optionsdialog.cpp

@ -150,7 +150,7 @@ namespace
} }
} }
class WheelEventEater : public QObject class WheelEventEater final : public QObject
{ {
public: public:
using QObject::QObject; using QObject::QObject;

2
src/gui/optionsdialog.h

@ -56,7 +56,7 @@ namespace Ui
class OptionsDialog; class OptionsDialog;
} }
class OptionsDialog : public QDialog class OptionsDialog final : public QDialog
{ {
Q_OBJECT Q_OBJECT
using ThisType = OptionsDialog; using ThisType = OptionsDialog;

2
src/gui/previewlistdelegate.h

@ -31,7 +31,7 @@
#include <QItemDelegate> #include <QItemDelegate>
class PreviewListDelegate : public QItemDelegate class PreviewListDelegate final : public QItemDelegate
{ {
Q_OBJECT Q_OBJECT
Q_DISABLE_COPY(PreviewListDelegate) Q_DISABLE_COPY(PreviewListDelegate)

2
src/gui/previewselectdialog.h

@ -45,7 +45,7 @@ namespace Ui
} }
class PreviewListDelegate; class PreviewListDelegate;
class PreviewSelectDialog : public QDialog class PreviewSelectDialog final : public QDialog
{ {
Q_OBJECT Q_OBJECT

6
src/gui/private/fspathedit_p.h

@ -45,7 +45,7 @@ class QStringRef;
namespace Private namespace Private
{ {
class FileSystemPathValidator : public QValidator class FileSystemPathValidator final : public QValidator
{ {
Q_OBJECT Q_OBJECT
@ -111,7 +111,7 @@ namespace Private
virtual QWidget *widget() = 0; virtual QWidget *widget() = 0;
}; };
class FileLineEdit : public QLineEdit, public FileEditorWithCompletion class FileLineEdit final : public QLineEdit, public FileEditorWithCompletion
{ {
Q_OBJECT Q_OBJECT
Q_DISABLE_COPY(FileLineEdit) Q_DISABLE_COPY(FileLineEdit)
@ -141,7 +141,7 @@ namespace Private
QAction *m_warningAction; QAction *m_warningAction;
}; };
class FileComboEdit : public QComboBox, public FileEditorWithCompletion class FileComboEdit final : public QComboBox, public FileEditorWithCompletion
{ {
Q_OBJECT Q_OBJECT

2
src/gui/private/tristatewidget.h

@ -32,7 +32,7 @@
class QString; class QString;
class TriStateWidget : public QWidget class TriStateWidget final : public QWidget
{ {
Q_OBJECT Q_OBJECT
Q_DISABLE_COPY(TriStateWidget) Q_DISABLE_COPY(TriStateWidget)

2
src/gui/properties/downloadedpiecesbar.h

@ -36,7 +36,7 @@
class QWidget; class QWidget;
class DownloadedPiecesBar : public PiecesBar class DownloadedPiecesBar final : public PiecesBar
{ {
using base = PiecesBar; using base = PiecesBar;
Q_OBJECT Q_OBJECT

2
src/gui/properties/peerlistsortmodel.h

@ -31,7 +31,7 @@
#include <QSortFilterProxyModel> #include <QSortFilterProxyModel>
class PeerListSortModel : public QSortFilterProxyModel class PeerListSortModel final : public QSortFilterProxyModel
{ {
Q_OBJECT Q_OBJECT
Q_DISABLE_COPY(PeerListSortModel) Q_DISABLE_COPY(PeerListSortModel)

2
src/gui/properties/peerlistwidget.h

@ -53,7 +53,7 @@ namespace Net
class ReverseResolution; class ReverseResolution;
} }
class PeerListWidget : public QTreeView class PeerListWidget final : public QTreeView
{ {
Q_OBJECT Q_OBJECT

2
src/gui/properties/pieceavailabilitybar.h

@ -31,7 +31,7 @@
#include "piecesbar.h" #include "piecesbar.h"
class PieceAvailabilityBar : public PiecesBar class PieceAvailabilityBar final : public PiecesBar
{ {
using base = PiecesBar; using base = PiecesBar;
Q_OBJECT Q_OBJECT

2
src/gui/properties/proplistdelegate.h

@ -49,7 +49,7 @@ enum PropColumn
AVAILABILITY AVAILABILITY
}; };
class PropListDelegate : public QItemDelegate class PropListDelegate final : public QItemDelegate
{ {
Q_OBJECT Q_OBJECT

2
src/gui/properties/speedplotview.h

@ -38,7 +38,7 @@
class QPen; class QPen;
class SpeedPlotView : public QGraphicsView class SpeedPlotView final : public QGraphicsView
{ {
Q_OBJECT Q_OBJECT

2
src/gui/properties/speedwidget.h

@ -40,7 +40,7 @@ class QVBoxLayout;
class PropertiesWidget; class PropertiesWidget;
class SpeedPlotView; class SpeedPlotView;
class ComboBoxMenuButton : public QComboBox class ComboBoxMenuButton final : public QComboBox
{ {
Q_OBJECT Q_OBJECT

2
src/gui/raisedmessagebox.h

@ -31,7 +31,7 @@
#include <QMessageBox> #include <QMessageBox>
class RaisedMessageBox : public QMessageBox class RaisedMessageBox final : public QMessageBox
{ {
Q_OBJECT Q_OBJECT

2
src/gui/rss/feedlistwidget.h

@ -41,7 +41,7 @@ namespace RSS
class Item; class Item;
} }
class FeedListWidget : public QTreeWidget class FeedListWidget final : public QTreeWidget
{ {
Q_OBJECT Q_OBJECT

4
src/gui/rss/htmlbrowser.h

@ -36,7 +36,7 @@ class QNetworkAccessManager;
class QNetworkDiskCache; class QNetworkDiskCache;
class QNetworkReply; class QNetworkReply;
class HtmlBrowser : public QTextBrowser class HtmlBrowser final : public QTextBrowser
{ {
Q_OBJECT Q_OBJECT
@ -44,7 +44,7 @@ public:
explicit HtmlBrowser(QWidget* parent = nullptr); explicit HtmlBrowser(QWidget* parent = nullptr);
~HtmlBrowser(); ~HtmlBrowser();
virtual QVariant loadResource(int type, const QUrl &name) override; QVariant loadResource(int type, const QUrl &name) override;
protected: protected:
QNetworkAccessManager *m_netManager; QNetworkAccessManager *m_netManager;

2
src/gui/scanfoldersdelegate.h

@ -39,7 +39,7 @@ class QTreeView;
class PropertiesWidget; class PropertiesWidget;
class ScanFoldersDelegate : public QItemDelegate class ScanFoldersDelegate final : public QItemDelegate
{ {
Q_OBJECT Q_OBJECT

2
src/gui/search/pluginselectdialog.h

@ -48,7 +48,7 @@ namespace Ui
class PluginSelectDialog; class PluginSelectDialog;
} }
class PluginSelectDialog : public QDialog class PluginSelectDialog final : public QDialog
{ {
Q_OBJECT Q_OBJECT
Q_DISABLE_COPY(PluginSelectDialog) Q_DISABLE_COPY(PluginSelectDialog)

2
src/gui/search/searchjobwidget.h

@ -51,7 +51,7 @@ namespace Ui
class SearchJobWidget; class SearchJobWidget;
} }
class SearchJobWidget : public QWidget class SearchJobWidget final : public QWidget
{ {
Q_OBJECT Q_OBJECT
Q_DISABLE_COPY(SearchJobWidget) Q_DISABLE_COPY(SearchJobWidget)

2
src/gui/search/searchlistdelegate.h

@ -31,7 +31,7 @@
#include <QItemDelegate> #include <QItemDelegate>
class SearchListDelegate : public QItemDelegate class SearchListDelegate final : public QItemDelegate
{ {
Q_OBJECT Q_OBJECT

2
src/gui/search/searchsortmodel.h

@ -32,7 +32,7 @@
#include <QSortFilterProxyModel> #include <QSortFilterProxyModel>
#include <QStringList> #include <QStringList>
class SearchSortModel : public QSortFilterProxyModel class SearchSortModel final : public QSortFilterProxyModel
{ {
using base = QSortFilterProxyModel; using base = QSortFilterProxyModel;

2
src/gui/shutdownconfirmdialog.h

@ -39,7 +39,7 @@ namespace Ui
class ShutdownConfirmDialog; class ShutdownConfirmDialog;
} }
class ShutdownConfirmDialog : public QDialog class ShutdownConfirmDialog final : public QDialog
{ {
Q_OBJECT Q_OBJECT

2
src/gui/tagfiltermodel.h

@ -42,7 +42,7 @@ namespace BitTorrent
class TorrentHandle; class TorrentHandle;
} }
class TagFilterModel : public QAbstractListModel class TagFilterModel final : public QAbstractListModel
{ {
Q_OBJECT Q_OBJECT

2
src/gui/tagfilterproxymodel.h

@ -33,7 +33,7 @@
class QString; class QString;
class TagFilterProxyModel : public QSortFilterProxyModel class TagFilterProxyModel final : public QSortFilterProxyModel
{ {
public: public:
explicit TagFilterProxyModel(QObject *parent = nullptr); explicit TagFilterProxyModel(QObject *parent = nullptr);

2
src/gui/tagfilterwidget.h

@ -31,7 +31,7 @@
#include <QTreeView> #include <QTreeView>
class TagFilterWidget : public QTreeView class TagFilterWidget final : public QTreeView
{ {
Q_OBJECT Q_OBJECT

2
src/gui/torrentcontentfiltermodel.h

@ -35,7 +35,7 @@
class TorrentContentModel; class TorrentContentModel;
class TorrentContentFilterModel : public QSortFilterProxyModel class TorrentContentFilterModel final : public QSortFilterProxyModel
{ {
Q_OBJECT Q_OBJECT

2
src/gui/torrentcontentmodel.cpp

@ -82,7 +82,7 @@ namespace
public: public:
using QFileIconProvider::icon; using QFileIconProvider::icon;
QIcon icon(const QFileInfo &info) const final override QIcon icon(const QFileInfo &info) const final
{ {
const QString ext = info.suffix(); const QString ext = info.suffix();
if (!ext.isEmpty()) { if (!ext.isEmpty()) {

2
src/gui/torrentcontentmodel.h

@ -45,7 +45,7 @@ namespace BitTorrent
class TorrentInfo; class TorrentInfo;
} }
class TorrentContentModel : public QAbstractItemModel class TorrentContentModel final : public QAbstractItemModel
{ {
Q_OBJECT Q_OBJECT
Q_DISABLE_COPY(TorrentContentModel) Q_DISABLE_COPY(TorrentContentModel)

2
src/gui/torrentcontentmodelfile.h

@ -36,7 +36,7 @@ namespace BitTorrent
enum class DownloadPriority; enum class DownloadPriority;
} }
class TorrentContentModelFile : public TorrentContentModelItem class TorrentContentModelFile final : public TorrentContentModelItem
{ {
public: public:
TorrentContentModelFile(const QString &fileName, qulonglong fileSize, TorrentContentModelFile(const QString &fileName, qulonglong fileSize,

2
src/gui/torrentcontentmodelfolder.h

@ -36,7 +36,7 @@ namespace BitTorrent
enum class DownloadPriority; enum class DownloadPriority;
} }
class TorrentContentModelFolder : public TorrentContentModelItem class TorrentContentModelFolder final : public TorrentContentModelItem
{ {
public: public:
// Folder constructor // Folder constructor

2
src/gui/torrentcontenttreeview.h

@ -37,7 +37,7 @@ namespace BitTorrent
class TorrentInfo; class TorrentInfo;
} }
class TorrentContentTreeView : public QTreeView class TorrentContentTreeView final : public QTreeView
{ {
Q_OBJECT Q_OBJECT

2
src/gui/torrentcreatordialog.h

@ -44,7 +44,7 @@ namespace Ui
class TorrentCreatorDialog; class TorrentCreatorDialog;
} }
class TorrentCreatorDialog : public QDialog class TorrentCreatorDialog final : public QDialog
{ {
Q_OBJECT Q_OBJECT

2
src/gui/transferlistdelegate.h

@ -34,7 +34,7 @@ class QModelIndex;
class QPainter; class QPainter;
class QStyleOptionViewItem; class QStyleOptionViewItem;
class TransferListDelegate : public QStyledItemDelegate class TransferListDelegate final : public QStyledItemDelegate
{ {
Q_OBJECT Q_OBJECT
Q_DISABLE_COPY(TransferListDelegate) Q_DISABLE_COPY(TransferListDelegate)

2
src/gui/transferlistfilterswidget.cpp

@ -74,7 +74,7 @@ namespace
return scheme; return scheme;
} }
class ArrowCheckBox : public QCheckBox class ArrowCheckBox final : public QCheckBox
{ {
public: public:
using QCheckBox::QCheckBox; using QCheckBox::QCheckBox;

4
src/gui/transferlistfilterswidget.h

@ -72,7 +72,7 @@ private slots:
virtual void torrentAboutToBeDeleted(BitTorrent::TorrentHandle *const) = 0; virtual void torrentAboutToBeDeleted(BitTorrent::TorrentHandle *const) = 0;
}; };
class StatusFilterWidget : public BaseFilterWidget class StatusFilterWidget final : public BaseFilterWidget
{ {
Q_OBJECT Q_OBJECT
Q_DISABLE_COPY(StatusFilterWidget) Q_DISABLE_COPY(StatusFilterWidget)
@ -93,7 +93,7 @@ private:
void torrentAboutToBeDeleted(BitTorrent::TorrentHandle *const) override; void torrentAboutToBeDeleted(BitTorrent::TorrentHandle *const) override;
}; };
class TrackerFiltersList : public BaseFilterWidget class TrackerFiltersList final : public BaseFilterWidget
{ {
Q_OBJECT Q_OBJECT
Q_DISABLE_COPY(TrackerFiltersList) Q_DISABLE_COPY(TrackerFiltersList)

2
src/gui/transferlistmodel.h

@ -41,7 +41,7 @@ namespace BitTorrent
class InfoHash; class InfoHash;
} }
class TransferListModel : public QAbstractListModel class TransferListModel final : public QAbstractListModel
{ {
Q_OBJECT Q_OBJECT
Q_DISABLE_COPY(TransferListModel) Q_DISABLE_COPY(TransferListModel)

2
src/gui/transferlistsortmodel.h

@ -33,7 +33,7 @@
class QStringList; class QStringList;
class TransferListSortModel : public QSortFilterProxyModel class TransferListSortModel final : public QSortFilterProxyModel
{ {
Q_OBJECT Q_OBJECT
Q_DISABLE_COPY(TransferListSortModel) Q_DISABLE_COPY(TransferListSortModel)

2
src/gui/transferlistwidget.h

@ -43,7 +43,7 @@ namespace BitTorrent
class TorrentHandle; class TorrentHandle;
} }
class TransferListWidget : public QTreeView class TransferListWidget final : public QTreeView
{ {
Q_OBJECT Q_OBJECT

2
src/gui/updownratiodialog.h

@ -36,7 +36,7 @@ namespace Ui
class UpDownRatioDialog; class UpDownRatioDialog;
} }
class UpDownRatioDialog : public QDialog class UpDownRatioDialog final : public QDialog
{ {
Q_OBJECT Q_OBJECT

Loading…
Cancel
Save