diff options
| author | Admiral H. Curtiss <pikachu025@gmail.com> | 2024-03-31 06:36:09 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-03-31 06:36:09 +0200 |
| commit | a2074a85831b873a5bf3e773ad903622400a3128 (patch) | |
| tree | d95a3a9da1585bdc638e273bc7f04fe6e172f6d0 /Source/Core/DolphinQt/Debugger/CodeWidget.cpp | |
| parent | 6e5f8d669227a7cfea247023c5aa2eeabe54f99a (diff) | |
| parent | b52a08d5332949c3b22f8434155cc8095d94df3a (diff) | |
Merge pull request #12645 from mitaclaw/ppc-symbols-signal
DolphinQt: A Ubiquitous Signal For When Symbols Change
Diffstat (limited to 'Source/Core/DolphinQt/Debugger/CodeWidget.cpp')
| -rw-r--r-- | Source/Core/DolphinQt/Debugger/CodeWidget.cpp | 28 |
1 files changed, 12 insertions, 16 deletions
diff --git a/Source/Core/DolphinQt/Debugger/CodeWidget.cpp b/Source/Core/DolphinQt/Debugger/CodeWidget.cpp index dbee26c6ec..89811fe421 100644 --- a/Source/Core/DolphinQt/Debugger/CodeWidget.cpp +++ b/Source/Core/DolphinQt/Debugger/CodeWidget.cpp @@ -65,8 +65,6 @@ CodeWidget::CodeWidget(QWidget* parent) Update(); }); - connect(Host::GetInstance(), &Host::NotifyMapLoaded, this, &CodeWidget::UpdateSymbols); - connect(&Settings::Instance(), &Settings::DebugModeToggled, this, [this](bool enabled) { setHidden(!enabled || !Settings::Instance().IsCodeVisible()); }); @@ -191,15 +189,7 @@ void CodeWidget::ConnectWidgets() connect(m_function_callers_list, &QListWidget::itemPressed, this, &CodeWidget::OnSelectFunctionCallers); - connect(m_code_view, &CodeViewWidget::SymbolsChanged, this, [this]() { - UpdateCallstack(); - UpdateSymbols(); - if (const Common::Symbol* symbol = m_ppc_symbol_db.GetSymbolFromAddr(m_code_view->GetAddress())) - { - UpdateFunctionCalls(symbol); - UpdateFunctionCallers(symbol); - } - }); + connect(Host::GetInstance(), &Host::PPCSymbolsChanged, this, &CodeWidget::OnPPCSymbolsChanged); connect(m_code_view, &CodeViewWidget::BreakpointsChanged, this, [this] { emit BreakpointsChanged(); }); connect(m_code_view, &CodeViewWidget::UpdateCodeWidget, this, &CodeWidget::Update); @@ -221,6 +211,17 @@ void CodeWidget::OnBranchWatchDialog() m_branch_watch_dialog->activateWindow(); } +void CodeWidget::OnPPCSymbolsChanged() +{ + UpdateSymbols(); + UpdateCallstack(); + if (const Common::Symbol* symbol = m_ppc_symbol_db.GetSymbolFromAddr(m_code_view->GetAddress())) + { + UpdateFunctionCalls(symbol); + UpdateFunctionCallers(symbol); + } +} + void CodeWidget::OnSearchAddress() { bool good = true; @@ -389,11 +390,6 @@ void CodeWidget::UpdateSymbols() } m_symbols_list->sortItems(); - - // TODO: There seems to be a lack of a ubiquitous signal for when symbols change. - // This is the best location to catch the signals from MenuBar and CodeViewWidget. - if (m_branch_watch_dialog != nullptr) - m_branch_watch_dialog->UpdateSymbols(); } void CodeWidget::UpdateFunctionCalls(const Common::Symbol* symbol) |
