From 4a2ec86a9a5bfaeefa2bb108c8d3fd7158f22d69 Mon Sep 17 00:00:00 2001 From: mitaclaw <140017135+mitaclaw@users.noreply.github.com> Date: Fri, 24 May 2024 15:44:49 -0700 Subject: [PATCH] Branch Watch Tool: Add Rule Of 5 And Remove Unnecessary Include --- Source/Core/DolphinQt/Debugger/BranchWatchDialog.cpp | 6 ++++++ Source/Core/DolphinQt/Debugger/BranchWatchDialog.h | 8 ++++++-- Source/Core/DolphinQt/Debugger/BranchWatchTableModel.h | 7 +++++++ 3 files changed, 19 insertions(+), 2 deletions(-) diff --git a/Source/Core/DolphinQt/Debugger/BranchWatchDialog.cpp b/Source/Core/DolphinQt/Debugger/BranchWatchDialog.cpp index a5b6358e04..e35259d2d2 100644 --- a/Source/Core/DolphinQt/Debugger/BranchWatchDialog.cpp +++ b/Source/Core/DolphinQt/Debugger/BranchWatchDialog.cpp @@ -57,6 +57,12 @@ public: : QSortFilterProxyModel(parent), m_branch_watch(branch_watch) { } + ~BranchWatchProxyModel() override = default; + + BranchWatchProxyModel(const BranchWatchProxyModel&) = delete; + BranchWatchProxyModel(BranchWatchProxyModel&&) = delete; + BranchWatchProxyModel& operator=(const BranchWatchProxyModel&) = delete; + BranchWatchProxyModel& operator=(BranchWatchProxyModel&&) = delete; BranchWatchTableModel* sourceModel() const { diff --git a/Source/Core/DolphinQt/Debugger/BranchWatchDialog.h b/Source/Core/DolphinQt/Debugger/BranchWatchDialog.h index dfeff8f4b3..b45f4c8563 100644 --- a/Source/Core/DolphinQt/Debugger/BranchWatchDialog.h +++ b/Source/Core/DolphinQt/Debugger/BranchWatchDialog.h @@ -9,12 +9,11 @@ #include #include -#include "Core/Core.h" - namespace Core { class BranchWatch; class CPUThreadGuard; +enum class State; class System; } // namespace Core class PPCSymbolDB; @@ -54,6 +53,11 @@ public: QWidget* parent = nullptr); ~BranchWatchDialog() override; + BranchWatchDialog(const BranchWatchDialog&) = delete; + BranchWatchDialog(BranchWatchDialog&&) = delete; + BranchWatchDialog& operator=(const BranchWatchDialog&) = delete; + BranchWatchDialog& operator=(BranchWatchDialog&&) = delete; + protected: void hideEvent(QHideEvent* event) override; void showEvent(QShowEvent* event) override; diff --git a/Source/Core/DolphinQt/Debugger/BranchWatchTableModel.h b/Source/Core/DolphinQt/Debugger/BranchWatchTableModel.h index b91dba37d2..aad2fd783a 100644 --- a/Source/Core/DolphinQt/Debugger/BranchWatchTableModel.h +++ b/Source/Core/DolphinQt/Debugger/BranchWatchTableModel.h @@ -75,6 +75,13 @@ public: m_ppc_symbol_db(ppc_symbol_db) { } + ~BranchWatchTableModel() override = default; + + BranchWatchTableModel(const BranchWatchTableModel&) = delete; + BranchWatchTableModel(BranchWatchTableModel&&) = delete; + BranchWatchTableModel& operator=(const BranchWatchTableModel&) = delete; + BranchWatchTableModel& operator=(BranchWatchTableModel&&) = delete; + QVariant data(const QModelIndex& index, int role = Qt::DisplayRole) const override; QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const override;