From b52a08d5332949c3b22f8434155cc8095d94df3a Mon Sep 17 00:00:00 2001 From: mitaclaw <140017135+mitaclaw@users.noreply.github.com> Date: Sat, 16 Mar 2024 23:05:56 -0700 Subject: 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. --- Source/Core/DolphinQt/Debugger/BranchWatchDialog.cpp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'Source/Core/DolphinQt/Debugger/BranchWatchDialog.cpp') diff --git a/Source/Core/DolphinQt/Debugger/BranchWatchDialog.cpp b/Source/Core/DolphinQt/Debugger/BranchWatchDialog.cpp index d9ff18db03..5cbd75faac 100644 --- a/Source/Core/DolphinQt/Debugger/BranchWatchDialog.cpp +++ b/Source/Core/DolphinQt/Debugger/BranchWatchDialog.cpp @@ -42,6 +42,7 @@ #include "Core/System.h" #include "DolphinQt/Debugger/BranchWatchTableModel.h" #include "DolphinQt/Debugger/CodeWidget.h" +#include "DolphinQt/Host.h" #include "DolphinQt/QtUtils/DolphinFileDialog.h" #include "DolphinQt/QtUtils/ModalMessageBox.h" #include "DolphinQt/QtUtils/SetWindowDecorations.h" @@ -219,6 +220,8 @@ BranchWatchDialog::BranchWatchDialog(Core::System& system, Core::BranchWatch& br m_table_model->setFont(ui_settings.GetDebugFont()); connect(&ui_settings, &Settings::DebugFontChanged, m_table_model, &BranchWatchTableModel::setFont); + connect(Host::GetInstance(), &Host::PPCSymbolsChanged, m_table_model, + &BranchWatchTableModel::UpdateSymbols); auto* const table_view = new QTableView; table_view->setModel(m_table_proxy); @@ -938,11 +941,6 @@ void BranchWatchDialog::Update() m_table_model->UpdateHits(); } -void BranchWatchDialog::UpdateSymbols() -{ - m_table_model->UpdateSymbols(); -} - void BranchWatchDialog::UpdateStatus() { switch (m_branch_watch.GetRecordingPhase()) -- cgit v1.2.3