From 2af46a43a613203f60ccff70ff336eea3278e4c7 Mon Sep 17 00:00:00 2001 From: Rosalie Wanders Date: Fri, 17 Oct 2025 21:34:32 +0200 Subject: [PATCH] RMG-Input: only capture required variables in signal lambdas --- Source/RMG-Input/UserInterface/Widget/AddMappingButton.cpp | 2 +- Source/RMG-Input/UserInterface/Widget/HotkeyButton.cpp | 2 +- Source/RMG-Input/UserInterface/Widget/MappingButton.cpp | 2 +- Source/RMG-Input/UserInterface/Widget/RemoveMappingButton.cpp | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Source/RMG-Input/UserInterface/Widget/AddMappingButton.cpp b/Source/RMG-Input/UserInterface/Widget/AddMappingButton.cpp index c7c57623..33121bc7 100644 --- a/Source/RMG-Input/UserInterface/Widget/AddMappingButton.cpp +++ b/Source/RMG-Input/UserInterface/Widget/AddMappingButton.cpp @@ -26,7 +26,7 @@ void AddMappingButton::Initialize(ControllerWidget* widget, MappingButton* butto this->controllerWidget = widget; this->mappingButton = button; - connect(this, &QPushButton::released, [=, this] + connect(this, &QPushButton::released, [this] { emit this->controllerWidget->on_AddMappingButton_Released(this->mappingButton); }); diff --git a/Source/RMG-Input/UserInterface/Widget/HotkeyButton.cpp b/Source/RMG-Input/UserInterface/Widget/HotkeyButton.cpp index 7f61b359..6a7a21fd 100644 --- a/Source/RMG-Input/UserInterface/Widget/HotkeyButton.cpp +++ b/Source/RMG-Input/UserInterface/Widget/HotkeyButton.cpp @@ -31,7 +31,7 @@ void HotkeyButton::Initialize(HotkeysDialog* dialog) { this->hotkeysDialog = dialog; - connect(this, &QPushButton::released, [=, this] + connect(this, &QPushButton::released, [this] { emit this->hotkeysDialog->on_HotkeyButton_Released(this); }); diff --git a/Source/RMG-Input/UserInterface/Widget/MappingButton.cpp b/Source/RMG-Input/UserInterface/Widget/MappingButton.cpp index 07630567..78e9be30 100644 --- a/Source/RMG-Input/UserInterface/Widget/MappingButton.cpp +++ b/Source/RMG-Input/UserInterface/Widget/MappingButton.cpp @@ -31,7 +31,7 @@ void MappingButton::Initialize(ControllerWidget* widget) { this->controllerWidget = widget; - connect(this, &QPushButton::released, [=, this] + connect(this, &QPushButton::released, [this] { emit this->controllerWidget->on_MappingButton_Released(this); }); diff --git a/Source/RMG-Input/UserInterface/Widget/RemoveMappingButton.cpp b/Source/RMG-Input/UserInterface/Widget/RemoveMappingButton.cpp index 12a03e9f..0617b7f4 100644 --- a/Source/RMG-Input/UserInterface/Widget/RemoveMappingButton.cpp +++ b/Source/RMG-Input/UserInterface/Widget/RemoveMappingButton.cpp @@ -26,7 +26,7 @@ void RemoveMappingButton::Initialize(ControllerWidget* widget, MappingButton* bu this->controllerWidget = widget; this->mappingButton = button; - connect(this, &QPushButton::released, [=, this] + connect(this, &QPushButton::released, [this] { emit this->controllerWidget->on_RemoveMappingButton_Released(this->mappingButton); });