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/GraphicsChoice.h"
|
||||
|
||||
#include <QSignalBlocker>
|
||||
|
||||
#include "Common/Config/Config.h"
|
||||
|
||||
#include "DolphinQt/Settings.h"
|
||||
@ -21,9 +23,8 @@ GraphicsChoice::GraphicsChoice(const QStringList& options, const Config::ConfigI
|
||||
bf.setBold(Config::GetActiveLayerForConfig(m_setting) != Config::LayerType::Base);
|
||||
setFont(bf);
|
||||
|
||||
bool old = blockSignals(true);
|
||||
const QSignalBlocker blocker(this);
|
||||
setCurrentIndex(Config::Get(m_setting));
|
||||
blockSignals(old);
|
||||
});
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user