mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2026-08-28 13:50:22 -05:00
Qt: Switch to QSignalBlocker for scoped signal blocking
This commit is contained in:
@@ -4,6 +4,8 @@
|
||||
|
||||
#include "DolphinQt/Config/Graphics/GraphicsRadio.h"
|
||||
|
||||
#include <QSignalBlocker>
|
||||
|
||||
#include "Common/Config/Config.h"
|
||||
|
||||
#include "DolphinQt/Settings.h"
|
||||
@@ -20,9 +22,8 @@ GraphicsRadioInt::GraphicsRadioInt(const QString& label, const Config::ConfigInf
|
||||
bf.setBold(Config::GetActiveLayerForConfig(m_setting) != Config::LayerType::Base);
|
||||
setFont(bf);
|
||||
|
||||
bool old = blockSignals(true);
|
||||
const QSignalBlocker blocker(this);
|
||||
setChecked(Config::Get(m_setting) == m_value);
|
||||
blockSignals(old);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user