summaryrefslogtreecommitdiff
path: root/Source/Core/DolphinQt/Debugger/CodeViewWidget.cpp
diff options
context:
space:
mode:
authormitaclaw <140017135+mitaclaw@users.noreply.github.com>2024-09-20 18:37:39 -0700
committermitaclaw <140017135+mitaclaw@users.noreply.github.com>2024-09-20 18:37:39 -0700
commit7c2a39706e84d112cf28883a64afe43aa6f0b916 (patch)
treefb1f9350391e2988b0d3bca941b413ab45e7fbc8 /Source/Core/DolphinQt/Debugger/CodeViewWidget.cpp
parent6851ed73f41f43b9a2da23e7f4cb58f58a904fe2 (diff)
DolphinQt: A Ubiquitous Signal For When Breakpoints Change
There were three distinct mechanisms for signaling breakpoint changes in DolphinQt, and the wiring had room for improvement. The behavior of these signals has been consolidated into the new `Host::PPCBreakpointsChanged` signal, which can be emitted from anywhere in DolphinQt to properly update breakpoints everywhere in DolphinQt. This improves a few things: - For the `CodeViewWidget` and `MemoryViewWidget`, signals no longer need to propagate through the `CodeWidget` and `MemoryWidget` (respectively) to reach their destination (incoming or outgoing). - For the `BreakpointWidget`, by self-triggering from its own signal, it no longer must manually call `Update()` after all of the emission sites. - For the `BranchWatchDialog`, it now has one less thing it must go through the `CodeWidget` for, which is a plus.
Diffstat (limited to 'Source/Core/DolphinQt/Debugger/CodeViewWidget.cpp')
-rw-r--r--Source/Core/DolphinQt/Debugger/CodeViewWidget.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/Source/Core/DolphinQt/Debugger/CodeViewWidget.cpp b/Source/Core/DolphinQt/Debugger/CodeViewWidget.cpp
index ed1ab0c7cb..1cb8c71544 100644
--- a/Source/Core/DolphinQt/Debugger/CodeViewWidget.cpp
+++ b/Source/Core/DolphinQt/Debugger/CodeViewWidget.cpp
@@ -188,6 +188,8 @@ CodeViewWidget::CodeViewWidget()
});
connect(Host::GetInstance(), &Host::PPCSymbolsChanged, this,
qOverload<>(&CodeViewWidget::Update));
+ connect(Host::GetInstance(), &Host::PPCBreakpointsChanged, this,
+ qOverload<>(&CodeViewWidget::Update));
connect(&Settings::Instance(), &Settings::ThemeChanged, this,
qOverload<>(&CodeViewWidget::Update));
@@ -1139,16 +1141,14 @@ void CodeViewWidget::ToggleBreakpoint()
{
m_system.GetPowerPC().GetBreakPoints().ToggleBreakPoint(GetContextAddress());
- emit BreakpointsChanged();
- Update();
+ emit Host::GetInstance()->PPCBreakpointsChanged();
}
void CodeViewWidget::AddBreakpoint()
{
m_system.GetPowerPC().GetBreakPoints().Add(GetContextAddress());
- emit BreakpointsChanged();
- Update();
+ emit Host::GetInstance()->PPCBreakpointsChanged();
}
u32 CodeViewWidget::GetContextAddress() const