style: use Q_DISABLE_COPY macro consistently

This commit is contained in:
Oleg Shparber 2023-08-19 11:18:28 -04:00
parent cfb1dc661e
commit 3fdeb66164
7 changed files with 7 additions and 18 deletions

View File

@ -36,19 +36,14 @@ class View;
class Container : public QWidget
{
Q_OBJECT
Q_DISABLE_COPY(Container)
public:
explicit Container(QWidget *parent = nullptr);
~Container() override;
void addView(View *view);
public slots:
signals:
private:
Q_DISABLE_COPY(Container)
QSplitter *m_splitter = nullptr;
QList<View *> m_views;

View File

@ -33,13 +33,12 @@ class ViewProvider;
class ProxyView final : public View
{
Q_OBJECT
Q_DISABLE_COPY(ProxyView)
public:
explicit ProxyView(ViewProvider *provider, QString id = QString(), QWidget *parent = nullptr);
~ProxyView() override;
private:
Q_DISABLE_COPY(ProxyView)
void clearCurrentView();
ViewProvider *m_viewProvider = nullptr;

View File

@ -31,11 +31,9 @@ namespace Sidebar {
class View : public QWidget
{
Q_OBJECT
Q_DISABLE_COPY(View)
public:
explicit View(QWidget *parent = nullptr);
private:
Q_DISABLE_COPY(View)
};
} // namespace Sidebar

View File

@ -33,6 +33,7 @@ class View;
class ViewProvider : public QObject
{
Q_OBJECT
Q_DISABLE_COPY(ViewProvider)
public:
explicit ViewProvider(QObject *parent = nullptr);
@ -40,9 +41,6 @@ public:
signals:
void viewChanged();
private:
Q_DISABLE_COPY(ViewProvider)
};
} // namespace Sidebar

View File

@ -47,6 +47,7 @@ class SearchSidebar;
class BrowserTab : public QWidget
{
Q_OBJECT
Q_DISABLE_COPY(BrowserTab)
public:
explicit BrowserTab(QWidget *parent = nullptr);
BrowserTab *clone(QWidget *parent = nullptr) const;
@ -64,7 +65,6 @@ signals:
void titleChanged(const QString &title);
private:
Q_DISABLE_COPY(BrowserTab)
QIcon docsetIcon(const QUrl &url) const;
// Widgets.

View File

@ -48,6 +48,7 @@ class SearchEdit;
class SearchSidebar final : public Sidebar::View
{
Q_OBJECT
Q_DISABLE_COPY(SearchSidebar)
public:
explicit SearchSidebar(QWidget *parent = nullptr);
SearchSidebar *clone(QWidget *parent = nullptr) const;
@ -73,7 +74,6 @@ protected:
void showEvent(QShowEvent *event) override;
private:
Q_DISABLE_COPY(SearchSidebar)
explicit SearchSidebar(const SearchSidebar *other, QWidget *parent = nullptr);
void setTreeViewModel(QAbstractItemModel *model, bool isRootDecorated);

View File

@ -33,14 +33,13 @@ class MainWindow;
class SidebarViewProvider : public Sidebar::ViewProvider
{
Q_OBJECT
Q_DISABLE_COPY(SidebarViewProvider)
public:
explicit SidebarViewProvider(MainWindow *mainWindow);
Sidebar::View *view(const QString &id = QString()) const override;
private:
Q_DISABLE_COPY(SidebarViewProvider)
MainWindow *m_mainWindow = nullptr;
};