summaryrefslogtreecommitdiff
path: root/Source/Core/DolphinQt/Debugger/CodeViewWidget.cpp
diff options
context:
space:
mode:
authormitaclaw <140017135+mitaclaw@users.noreply.github.com>2024-03-16 23:05:56 -0700
committermitaclaw <140017135+mitaclaw@users.noreply.github.com>2024-03-28 09:57:22 -0700
commitb52a08d5332949c3b22f8434155cc8095d94df3a (patch)
tree7c62fcc63540d0c1bce670b43f96ffe10ef6ca5f /Source/Core/DolphinQt/Debugger/CodeViewWidget.cpp
parent1efda863e47b690f460f069502a4391b3c7d87c4 (diff)
DolphinQt: A Ubiquitous Signal For When Symbols Change
There were three distinct mechanisms for signaling symbol changes in DolphinQt: `Host::NotifyMapLoaded`, `MenuBar::NotifySymbolsUpdated`, and `CodeViewWidget::SymbolsChanged`. The behavior of these signals has been consolidated into the new `Host::PPCSymbolsUpdated` signal, which can be emitted from anywhere in DolphinQt to properly update symbols everywhere in DolphinQt.
Diffstat (limited to 'Source/Core/DolphinQt/Debugger/CodeViewWidget.cpp')
-rw-r--r--Source/Core/DolphinQt/Debugger/CodeViewWidget.cpp14
1 files changed, 6 insertions, 8 deletions
diff --git a/Source/Core/DolphinQt/Debugger/CodeViewWidget.cpp b/Source/Core/DolphinQt/Debugger/CodeViewWidget.cpp
index a7b097b93c..1364ac593b 100644
--- a/Source/Core/DolphinQt/Debugger/CodeViewWidget.cpp
+++ b/Source/Core/DolphinQt/Debugger/CodeViewWidget.cpp
@@ -184,6 +184,8 @@ CodeViewWidget::CodeViewWidget()
m_address = m_system.GetPPCState().pc;
Update();
});
+ connect(Host::GetInstance(), &Host::PPCSymbolsChanged, this,
+ qOverload<>(&CodeViewWidget::Update));
connect(&Settings::Instance(), &Settings::ThemeChanged, this,
qOverload<>(&CodeViewWidget::Update));
@@ -879,8 +881,7 @@ void CodeViewWidget::OnAddFunction()
Core::CPUThreadGuard guard(m_system);
m_ppc_symbol_db.AddFunction(guard, addr);
- emit SymbolsChanged();
- Update(&guard);
+ emit Host::GetInstance()->PPCSymbolsChanged();
}
void CodeViewWidget::OnInsertBLR()
@@ -929,8 +930,7 @@ void CodeViewWidget::OnRenameSymbol()
if (good && !name.isEmpty())
{
symbol->Rename(name.toStdString());
- emit SymbolsChanged();
- Update();
+ emit Host::GetInstance()->PPCSymbolsChanged();
}
}
@@ -968,8 +968,7 @@ void CodeViewWidget::OnSetSymbolSize()
Core::CPUThreadGuard guard(m_system);
PPCAnalyst::ReanalyzeFunction(guard, symbol->address, *symbol, size);
- emit SymbolsChanged();
- Update(&guard);
+ emit Host::GetInstance()->PPCSymbolsChanged();
}
void CodeViewWidget::OnSetSymbolEndAddress()
@@ -996,8 +995,7 @@ void CodeViewWidget::OnSetSymbolEndAddress()
Core::CPUThreadGuard guard(m_system);
PPCAnalyst::ReanalyzeFunction(guard, symbol->address, *symbol, address - symbol->address);
- emit SymbolsChanged();
- Update(&guard);
+ emit Host::GetInstance()->PPCSymbolsChanged();
}
void CodeViewWidget::OnReplaceInstruction()