From a83bf8bc59ee56bc7b6574c749961fd115004143 Mon Sep 17 00:00:00 2001 From: iwubcode Date: Sat, 12 Sep 2020 17:06:17 -0500 Subject: [PATCH] DolphinQt: properly remove slot connection for ConfigChange when object is destructed --- Source/Core/DolphinQt/Config/Graphics/GraphicsBool.cpp | 2 +- Source/Core/DolphinQt/Config/Graphics/GraphicsChoice.cpp | 2 +- Source/Core/DolphinQt/Config/Graphics/GraphicsInteger.cpp | 2 +- Source/Core/DolphinQt/Config/Graphics/GraphicsRadio.cpp | 2 +- Source/Core/DolphinQt/Config/Graphics/GraphicsSlider.cpp | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Source/Core/DolphinQt/Config/Graphics/GraphicsBool.cpp b/Source/Core/DolphinQt/Config/Graphics/GraphicsBool.cpp index efd761416e..4d5eaf6973 100644 --- a/Source/Core/DolphinQt/Config/Graphics/GraphicsBool.cpp +++ b/Source/Core/DolphinQt/Config/Graphics/GraphicsBool.cpp @@ -18,7 +18,7 @@ GraphicsBool::GraphicsBool(const QString& label, const Config::Info& setti connect(this, &QCheckBox::toggled, this, &GraphicsBool::Update); setChecked(Config::Get(m_setting) ^ reverse); - connect(&Settings::Instance(), &Settings::ConfigChanged, [this] { + connect(&Settings::Instance(), &Settings::ConfigChanged, this, [this] { QFont bf = font(); bf.setBold(Config::GetActiveLayerForConfig(m_setting) != Config::LayerType::Base); setFont(bf); diff --git a/Source/Core/DolphinQt/Config/Graphics/GraphicsChoice.cpp b/Source/Core/DolphinQt/Config/Graphics/GraphicsChoice.cpp index 923921ab15..5dab43fb71 100644 --- a/Source/Core/DolphinQt/Config/Graphics/GraphicsChoice.cpp +++ b/Source/Core/DolphinQt/Config/Graphics/GraphicsChoice.cpp @@ -17,7 +17,7 @@ GraphicsChoice::GraphicsChoice(const QStringList& options, const Config::Info(&QComboBox::currentIndexChanged), this, &GraphicsChoice::Update); setCurrentIndex(Config::Get(m_setting)); - connect(&Settings::Instance(), &Settings::ConfigChanged, [this] { + connect(&Settings::Instance(), &Settings::ConfigChanged, this, [this] { QFont bf = font(); bf.setBold(Config::GetActiveLayerForConfig(m_setting) != Config::LayerType::Base); setFont(bf); diff --git a/Source/Core/DolphinQt/Config/Graphics/GraphicsInteger.cpp b/Source/Core/DolphinQt/Config/Graphics/GraphicsInteger.cpp index 7c81634248..b69f02ecdb 100644 --- a/Source/Core/DolphinQt/Config/Graphics/GraphicsInteger.cpp +++ b/Source/Core/DolphinQt/Config/Graphics/GraphicsInteger.cpp @@ -21,7 +21,7 @@ GraphicsInteger::GraphicsInteger(int minimum, int maximum, const Config::Info(&GraphicsInteger::valueChanged), this, &GraphicsInteger::Update); - connect(&Settings::Instance(), &Settings::ConfigChanged, [this] { + connect(&Settings::Instance(), &Settings::ConfigChanged, this, [this] { QFont bf = font(); bf.setBold(Config::GetActiveLayerForConfig(m_setting) != Config::LayerType::Base); setFont(bf); diff --git a/Source/Core/DolphinQt/Config/Graphics/GraphicsRadio.cpp b/Source/Core/DolphinQt/Config/Graphics/GraphicsRadio.cpp index 6da089321f..eb15527b71 100644 --- a/Source/Core/DolphinQt/Config/Graphics/GraphicsRadio.cpp +++ b/Source/Core/DolphinQt/Config/Graphics/GraphicsRadio.cpp @@ -17,7 +17,7 @@ GraphicsRadioInt::GraphicsRadioInt(const QString& label, const Config::Info setChecked(Config::Get(m_setting) == m_value); connect(this, &QRadioButton::toggled, this, &GraphicsRadioInt::Update); - connect(&Settings::Instance(), &Settings::ConfigChanged, [this] { + connect(&Settings::Instance(), &Settings::ConfigChanged, this, [this] { QFont bf = font(); bf.setBold(Config::GetActiveLayerForConfig(m_setting) != Config::LayerType::Base); setFont(bf); diff --git a/Source/Core/DolphinQt/Config/Graphics/GraphicsSlider.cpp b/Source/Core/DolphinQt/Config/Graphics/GraphicsSlider.cpp index 48d1c59b8b..350873c570 100644 --- a/Source/Core/DolphinQt/Config/Graphics/GraphicsSlider.cpp +++ b/Source/Core/DolphinQt/Config/Graphics/GraphicsSlider.cpp @@ -21,7 +21,7 @@ GraphicsSlider::GraphicsSlider(int minimum, int maximum, const Config::Info connect(this, &GraphicsSlider::valueChanged, this, &GraphicsSlider::Update); - connect(&Settings::Instance(), &Settings::ConfigChanged, [this] { + connect(&Settings::Instance(), &Settings::ConfigChanged, this, [this] { QFont bf = font(); bf.setBold(Config::GetActiveLayerForConfig(m_setting) != Config::LayerType::Base); setFont(bf);