mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-21 05:09:34 -06: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