mirror of
https://github.com/d47081/qBittorrent.git
synced 2025-01-14 16:57:55 +00:00
Disable copy, move constructors when inheriting from QObject
This commit is contained in:
parent
7764169aa3
commit
c8b4611d8d
@ -43,6 +43,7 @@ namespace Net
|
|||||||
class DNSUpdater : public QObject
|
class DNSUpdater : public QObject
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
Q_DISABLE_COPY_MOVE(DNSUpdater)
|
||||||
|
|
||||||
public:
|
public:
|
||||||
explicit DNSUpdater(QObject *parent = nullptr);
|
explicit DNSUpdater(QObject *parent = nullptr);
|
||||||
|
@ -50,6 +50,7 @@ namespace Net
|
|||||||
class Smtp : public QObject
|
class Smtp : public QObject
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
Q_DISABLE_COPY_MOVE(Smtp)
|
||||||
|
|
||||||
public:
|
public:
|
||||||
Smtp(QObject *parent = nullptr);
|
Smtp(QObject *parent = nullptr);
|
||||||
|
@ -94,11 +94,6 @@ class Preferences : public QObject
|
|||||||
|
|
||||||
Preferences();
|
Preferences();
|
||||||
|
|
||||||
static Preferences *m_instance;
|
|
||||||
|
|
||||||
signals:
|
|
||||||
void changed();
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
static void initInstance();
|
static void initInstance();
|
||||||
static void freeInstance();
|
static void freeInstance();
|
||||||
@ -414,4 +409,10 @@ public slots:
|
|||||||
void setTrackerFilterState(bool checked);
|
void setTrackerFilterState(bool checked);
|
||||||
|
|
||||||
void apply();
|
void apply();
|
||||||
|
|
||||||
|
signals:
|
||||||
|
void changed();
|
||||||
|
|
||||||
|
private:
|
||||||
|
static Preferences *m_instance;
|
||||||
};
|
};
|
||||||
|
@ -52,6 +52,7 @@ namespace RSS
|
|||||||
class Parser : public QObject
|
class Parser : public QObject
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
Q_DISABLE_COPY_MOVE(Parser)
|
||||||
|
|
||||||
public:
|
public:
|
||||||
explicit Parser(QString lastBuildDate);
|
explicit Parser(QString lastBuildDate);
|
||||||
|
@ -53,6 +53,8 @@ struct IsQFlags<QFlags<T>> : std::true_type {};
|
|||||||
class SettingsStorage final : public QObject
|
class SettingsStorage final : public QObject
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
Q_DISABLE_COPY_MOVE(SettingsStorage)
|
||||||
|
|
||||||
SettingsStorage();
|
SettingsStorage();
|
||||||
~SettingsStorage();
|
~SettingsStorage();
|
||||||
|
|
||||||
|
@ -41,6 +41,7 @@ namespace Ui
|
|||||||
class AutoExpandableDialog final : public QDialog
|
class AutoExpandableDialog final : public QDialog
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
Q_DISABLE_COPY_MOVE(AutoExpandableDialog)
|
||||||
|
|
||||||
public:
|
public:
|
||||||
explicit AutoExpandableDialog(QWidget *parent);
|
explicit AutoExpandableDialog(QWidget *parent);
|
||||||
|
@ -42,6 +42,7 @@ namespace BitTorrent
|
|||||||
class CategoryFilterModel final : public QAbstractItemModel
|
class CategoryFilterModel final : public QAbstractItemModel
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
Q_DISABLE_COPY_MOVE(CategoryFilterModel)
|
||||||
|
|
||||||
public:
|
public:
|
||||||
explicit CategoryFilterModel(QObject *parent = nullptr);
|
explicit CategoryFilterModel(QObject *parent = nullptr);
|
||||||
|
@ -42,6 +42,7 @@ namespace Ui
|
|||||||
class CookiesDialog final : public QDialog
|
class CookiesDialog final : public QDialog
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
Q_DISABLE_COPY_MOVE(CookiesDialog)
|
||||||
|
|
||||||
public:
|
public:
|
||||||
explicit CookiesDialog(QWidget *parent = nullptr);
|
explicit CookiesDialog(QWidget *parent = nullptr);
|
||||||
|
@ -35,6 +35,7 @@
|
|||||||
class CookiesModel final : public QAbstractItemModel
|
class CookiesModel final : public QAbstractItemModel
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
Q_DISABLE_COPY_MOVE(CookiesModel)
|
||||||
|
|
||||||
public:
|
public:
|
||||||
enum Column
|
enum Column
|
||||||
|
@ -40,6 +40,7 @@ namespace Ui
|
|||||||
class DeletionConfirmationDialog : public QDialog
|
class DeletionConfirmationDialog : public QDialog
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
Q_DISABLE_COPY_MOVE(DeletionConfirmationDialog)
|
||||||
|
|
||||||
public:
|
public:
|
||||||
DeletionConfirmationDialog(QWidget *parent, int size, const QString &name, bool defaultDeleteFiles);
|
DeletionConfirmationDialog(QWidget *parent, int size, const QString &name, bool defaultDeleteFiles);
|
||||||
|
@ -44,6 +44,7 @@ class LogListView;
|
|||||||
class ExecutionLogWidget : public QWidget
|
class ExecutionLogWidget : public QWidget
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
Q_DISABLE_COPY_MOVE(ExecutionLogWidget)
|
||||||
|
|
||||||
public:
|
public:
|
||||||
ExecutionLogWidget(Log::MsgTypes types, QWidget *parent);
|
ExecutionLogWidget(Log::MsgTypes types, QWidget *parent);
|
||||||
|
@ -46,11 +46,15 @@ namespace Private
|
|||||||
class FileSystemPathEdit : public QWidget
|
class FileSystemPathEdit : public QWidget
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
Q_DISABLE_COPY_MOVE(FileSystemPathEdit)
|
||||||
|
|
||||||
Q_PROPERTY(Mode mode READ mode WRITE setMode)
|
Q_PROPERTY(Mode mode READ mode WRITE setMode)
|
||||||
Q_PROPERTY(Path selectedPath READ selectedPath WRITE setSelectedPath NOTIFY selectedPathChanged)
|
Q_PROPERTY(Path selectedPath READ selectedPath WRITE setSelectedPath NOTIFY selectedPathChanged)
|
||||||
Q_PROPERTY(QString fileNameFilter READ fileNameFilter WRITE setFileNameFilter)
|
Q_PROPERTY(QString fileNameFilter READ fileNameFilter WRITE setFileNameFilter)
|
||||||
Q_PROPERTY(QString dialogCaption READ dialogCaption WRITE setDialogCaption)
|
Q_PROPERTY(QString dialogCaption READ dialogCaption WRITE setDialogCaption)
|
||||||
|
|
||||||
|
class FileSystemPathEditPrivate;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
~FileSystemPathEdit() override;
|
~FileSystemPathEdit() override;
|
||||||
|
|
||||||
@ -100,13 +104,13 @@ protected slots:
|
|||||||
void onPathEdited();
|
void onPathEdited();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
Q_DECLARE_PRIVATE(FileSystemPathEdit)
|
||||||
|
|
||||||
virtual QString editWidgetText() const = 0;
|
virtual QString editWidgetText() const = 0;
|
||||||
virtual void setEditWidgetText(const QString &text) = 0;
|
virtual void setEditWidgetText(const QString &text) = 0;
|
||||||
|
|
||||||
QWidget *editWidgetImpl() const;
|
QWidget *editWidgetImpl() const;
|
||||||
Q_DISABLE_COPY_MOVE(FileSystemPathEdit)
|
|
||||||
class FileSystemPathEditPrivate;
|
|
||||||
Q_DECLARE_PRIVATE(FileSystemPathEdit)
|
|
||||||
FileSystemPathEditPrivate *d_ptr;
|
FileSystemPathEditPrivate *d_ptr;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -47,6 +47,7 @@ namespace Private
|
|||||||
class FileSystemPathValidator final : public QValidator
|
class FileSystemPathValidator final : public QValidator
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
Q_DISABLE_COPY_MOVE(FileSystemPathValidator)
|
||||||
|
|
||||||
public:
|
public:
|
||||||
FileSystemPathValidator(QObject *parent = nullptr);
|
FileSystemPathValidator(QObject *parent = nullptr);
|
||||||
@ -147,6 +148,7 @@ namespace Private
|
|||||||
class FileComboEdit final : public QComboBox, public FileEditorWithCompletion
|
class FileComboEdit final : public QComboBox, public FileEditorWithCompletion
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
Q_DISABLE_COPY_MOVE(FileComboEdit)
|
||||||
|
|
||||||
public:
|
public:
|
||||||
FileComboEdit(QWidget *parent = nullptr);
|
FileComboEdit(QWidget *parent = nullptr);
|
||||||
|
@ -16,6 +16,7 @@ class QToolButton;
|
|||||||
class LineEdit final : public QLineEdit
|
class LineEdit final : public QLineEdit
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
Q_DISABLE_COPY_MOVE(LineEdit)
|
||||||
|
|
||||||
public:
|
public:
|
||||||
LineEdit(QWidget *parent);
|
LineEdit(QWidget *parent);
|
||||||
|
@ -74,6 +74,7 @@ namespace Ui
|
|||||||
class MainWindow final : public QMainWindow
|
class MainWindow final : public QMainWindow
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
Q_DISABLE_COPY_MOVE(MainWindow)
|
||||||
|
|
||||||
public:
|
public:
|
||||||
explicit MainWindow(QWidget *parent = nullptr);
|
explicit MainWindow(QWidget *parent = nullptr);
|
||||||
|
@ -43,6 +43,7 @@ class PowerManagementInhibitor;
|
|||||||
class PowerManagement : public QObject
|
class PowerManagement : public QObject
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
Q_DISABLE_COPY_MOVE(PowerManagement)
|
||||||
|
|
||||||
public:
|
public:
|
||||||
PowerManagement(QObject *parent = nullptr);
|
PowerManagement(QObject *parent = nullptr);
|
||||||
|
@ -35,6 +35,7 @@ class QDBusPendingCallWatcher;
|
|||||||
class PowerManagementInhibitor : public QObject
|
class PowerManagementInhibitor : public QObject
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
Q_DISABLE_COPY_MOVE(PowerManagementInhibitor)
|
||||||
|
|
||||||
public:
|
public:
|
||||||
PowerManagementInhibitor(QObject *parent = nullptr);
|
PowerManagementInhibitor(QObject *parent = nullptr);
|
||||||
|
@ -55,6 +55,7 @@ namespace Net
|
|||||||
class PeerListWidget final : public QTreeView
|
class PeerListWidget final : public QTreeView
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
Q_DISABLE_COPY_MOVE(PeerListWidget)
|
||||||
|
|
||||||
public:
|
public:
|
||||||
enum PeerListColumns
|
enum PeerListColumns
|
||||||
|
@ -41,6 +41,7 @@ namespace Ui
|
|||||||
class PeersAdditionDialog : public QDialog
|
class PeersAdditionDialog : public QDialog
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
Q_DISABLE_COPY_MOVE(PeersAdditionDialog)
|
||||||
|
|
||||||
public:
|
public:
|
||||||
PeersAdditionDialog(QWidget *parent);
|
PeersAdditionDialog(QWidget *parent);
|
||||||
|
@ -32,10 +32,11 @@
|
|||||||
|
|
||||||
class PieceAvailabilityBar final : public PiecesBar
|
class PieceAvailabilityBar final : public PiecesBar
|
||||||
{
|
{
|
||||||
using base = PiecesBar;
|
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
Q_DISABLE_COPY_MOVE(PieceAvailabilityBar)
|
Q_DISABLE_COPY_MOVE(PieceAvailabilityBar)
|
||||||
|
|
||||||
|
using base = PiecesBar;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
PieceAvailabilityBar(QWidget *parent);
|
PieceAvailabilityBar(QWidget *parent);
|
||||||
|
|
||||||
|
@ -42,10 +42,11 @@ namespace BitTorrent
|
|||||||
|
|
||||||
class PiecesBar : public QWidget
|
class PiecesBar : public QWidget
|
||||||
{
|
{
|
||||||
using base = QWidget;
|
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
Q_DISABLE_COPY_MOVE(PiecesBar)
|
Q_DISABLE_COPY_MOVE(PiecesBar)
|
||||||
|
|
||||||
|
using base = QWidget;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
explicit PiecesBar(QWidget *parent = nullptr);
|
explicit PiecesBar(QWidget *parent = nullptr);
|
||||||
|
|
||||||
|
@ -48,6 +48,7 @@ using namespace std::chrono_literals;
|
|||||||
class SpeedPlotView final : public QGraphicsView
|
class SpeedPlotView final : public QGraphicsView
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
Q_DISABLE_COPY_MOVE(SpeedPlotView)
|
||||||
|
|
||||||
public:
|
public:
|
||||||
enum GraphID
|
enum GraphID
|
||||||
|
@ -42,6 +42,7 @@ class SpeedPlotView;
|
|||||||
class ComboBoxMenuButton final : public QComboBox
|
class ComboBoxMenuButton final : public QComboBox
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
Q_DISABLE_COPY_MOVE(ComboBoxMenuButton)
|
||||||
|
|
||||||
public:
|
public:
|
||||||
ComboBoxMenuButton(QWidget *parent, QMenu *menu);
|
ComboBoxMenuButton(QWidget *parent, QMenu *menu);
|
||||||
@ -55,6 +56,7 @@ private:
|
|||||||
class SpeedWidget : public QWidget
|
class SpeedWidget : public QWidget
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
Q_DISABLE_COPY_MOVE(SpeedWidget)
|
||||||
|
|
||||||
public:
|
public:
|
||||||
explicit SpeedWidget(PropertiesWidget *parent);
|
explicit SpeedWidget(PropertiesWidget *parent);
|
||||||
|
@ -51,6 +51,7 @@ namespace Ui
|
|||||||
class TrackersAdditionDialog : public QDialog
|
class TrackersAdditionDialog : public QDialog
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
Q_DISABLE_COPY_MOVE(TrackersAdditionDialog)
|
||||||
|
|
||||||
public:
|
public:
|
||||||
TrackersAdditionDialog(QWidget *parent, BitTorrent::Torrent *const torrent);
|
TrackersAdditionDialog(QWidget *parent, BitTorrent::Torrent *const torrent);
|
||||||
|
@ -40,6 +40,7 @@ namespace RSS
|
|||||||
class ArticleListWidget : public QListWidget
|
class ArticleListWidget : public QListWidget
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
Q_DISABLE_COPY_MOVE(ArticleListWidget)
|
||||||
|
|
||||||
public:
|
public:
|
||||||
explicit ArticleListWidget(QWidget *parent);
|
explicit ArticleListWidget(QWidget *parent);
|
||||||
|
@ -43,6 +43,7 @@ namespace RSS
|
|||||||
class FeedListWidget final : public QTreeWidget
|
class FeedListWidget final : public QTreeWidget
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
Q_DISABLE_COPY_MOVE(FeedListWidget)
|
||||||
|
|
||||||
public:
|
public:
|
||||||
explicit FeedListWidget(QWidget *parent);
|
explicit FeedListWidget(QWidget *parent);
|
||||||
|
@ -38,6 +38,7 @@ class QNetworkReply;
|
|||||||
class HtmlBrowser final : public QTextBrowser
|
class HtmlBrowser final : public QTextBrowser
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
Q_DISABLE_COPY_MOVE(HtmlBrowser)
|
||||||
|
|
||||||
public:
|
public:
|
||||||
explicit HtmlBrowser(QWidget* parent = nullptr);
|
explicit HtmlBrowser(QWidget* parent = nullptr);
|
||||||
|
@ -46,6 +46,7 @@ namespace Ui
|
|||||||
class RSSWidget : public QWidget
|
class RSSWidget : public QWidget
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
Q_DISABLE_COPY_MOVE(RSSWidget)
|
||||||
|
|
||||||
public:
|
public:
|
||||||
RSSWidget(QWidget *parent);
|
RSSWidget(QWidget *parent);
|
||||||
|
@ -41,6 +41,7 @@ namespace Ui
|
|||||||
class ShutdownConfirmDialog final : public QDialog
|
class ShutdownConfirmDialog final : public QDialog
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
Q_DISABLE_COPY_MOVE(ShutdownConfirmDialog)
|
||||||
|
|
||||||
public:
|
public:
|
||||||
ShutdownConfirmDialog(QWidget *parent, const ShutdownDialogAction &action);
|
ShutdownConfirmDialog(QWidget *parent, const ShutdownDialogAction &action);
|
||||||
|
@ -45,6 +45,7 @@ namespace BitTorrent
|
|||||||
class TagFilterModel final : public QAbstractListModel
|
class TagFilterModel final : public QAbstractListModel
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
Q_DISABLE_COPY_MOVE(TagFilterModel)
|
||||||
|
|
||||||
public:
|
public:
|
||||||
explicit TagFilterModel(QObject *parent = nullptr);
|
explicit TagFilterModel(QObject *parent = nullptr);
|
||||||
|
@ -33,6 +33,7 @@
|
|||||||
class TagFilterWidget final : public QTreeView
|
class TagFilterWidget final : public QTreeView
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
Q_DISABLE_COPY_MOVE(TagFilterWidget)
|
||||||
|
|
||||||
public:
|
public:
|
||||||
explicit TagFilterWidget(QWidget *parent = nullptr);
|
explicit TagFilterWidget(QWidget *parent = nullptr);
|
||||||
|
@ -38,6 +38,7 @@ class TorrentContentModel;
|
|||||||
class TorrentContentFilterModel final : public QSortFilterProxyModel
|
class TorrentContentFilterModel final : public QSortFilterProxyModel
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
Q_DISABLE_COPY_MOVE(TorrentContentFilterModel)
|
||||||
|
|
||||||
public:
|
public:
|
||||||
TorrentContentFilterModel(QObject *parent = nullptr);
|
TorrentContentFilterModel(QObject *parent = nullptr);
|
||||||
|
Loading…
Reference in New Issue
Block a user