mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2024-11-14 21:37:52 -07:00
Merge pull request #9565 from sepalani/qt-blocker
BreakpointWidget: Use QSignalBlocker
This commit is contained in:
commit
adcdeda372
@ -6,6 +6,7 @@
|
||||
|
||||
#include <QHeaderView>
|
||||
#include <QMenu>
|
||||
#include <QSignalBlocker>
|
||||
#include <QTableWidget>
|
||||
#include <QToolBar>
|
||||
#include <QVBoxLayout>
|
||||
@ -262,9 +263,8 @@ void BreakpointWidget::OnDelete()
|
||||
|
||||
if (is_memcheck)
|
||||
{
|
||||
Settings::Instance().blockSignals(true);
|
||||
const QSignalBlocker blocker(Settings::Instance());
|
||||
PowerPC::memchecks.Remove(address);
|
||||
Settings::Instance().blockSignals(false);
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -278,9 +278,10 @@ void BreakpointWidget::OnDelete()
|
||||
void BreakpointWidget::OnClear()
|
||||
{
|
||||
PowerPC::debug_interface.ClearAllBreakpoints();
|
||||
Settings::Instance().blockSignals(true);
|
||||
PowerPC::debug_interface.ClearAllMemChecks();
|
||||
Settings::Instance().blockSignals(false);
|
||||
{
|
||||
const QSignalBlocker blocker(Settings::Instance());
|
||||
PowerPC::debug_interface.ClearAllMemChecks();
|
||||
}
|
||||
|
||||
m_table->setRowCount(0);
|
||||
|
||||
@ -314,9 +315,8 @@ void BreakpointWidget::OnLoad()
|
||||
if (ini.GetLines("MemoryBreakPoints", &new_mcs, false))
|
||||
{
|
||||
PowerPC::memchecks.Clear();
|
||||
Settings::Instance().blockSignals(true);
|
||||
const QSignalBlocker blocker(Settings::Instance());
|
||||
PowerPC::memchecks.AddFromStrings(new_mcs);
|
||||
Settings::Instance().blockSignals(false);
|
||||
}
|
||||
|
||||
emit BreakpointsChanged();
|
||||
@ -410,9 +410,10 @@ void BreakpointWidget::AddAddressMBP(u32 addr, bool on_read, bool on_write, bool
|
||||
check.log_on_hit = do_log;
|
||||
check.break_on_hit = do_break;
|
||||
|
||||
Settings::Instance().blockSignals(true);
|
||||
PowerPC::memchecks.Add(check);
|
||||
Settings::Instance().blockSignals(false);
|
||||
{
|
||||
const QSignalBlocker blocker(Settings::Instance());
|
||||
PowerPC::memchecks.Add(check);
|
||||
}
|
||||
|
||||
emit BreakpointsChanged();
|
||||
Update();
|
||||
@ -431,9 +432,10 @@ void BreakpointWidget::AddRangedMBP(u32 from, u32 to, bool on_read, bool on_writ
|
||||
check.log_on_hit = do_log;
|
||||
check.break_on_hit = do_break;
|
||||
|
||||
Settings::Instance().blockSignals(true);
|
||||
PowerPC::memchecks.Add(check);
|
||||
Settings::Instance().blockSignals(false);
|
||||
{
|
||||
const QSignalBlocker blocker(Settings::Instance());
|
||||
PowerPC::memchecks.Add(check);
|
||||
}
|
||||
|
||||
emit BreakpointsChanged();
|
||||
Update();
|
||||
|
Loading…
Reference in New Issue
Block a user