Source: Remove redundant lambda parameter lists

This commit is contained in:
Dr. Dystopia
2025-04-28 22:02:56 +02:00
parent 95f6c76713
commit ca8f9b672b
54 changed files with 108 additions and 111 deletions

View File

@ -113,7 +113,7 @@ QTextCharFormat GetCommentCharFormat()
ControlExpressionSyntaxHighlighter::ControlExpressionSyntaxHighlighter(QTextDocument* parent)
: QObject(parent)
{
connect(parent, &QTextDocument::contentsChanged, this, [this, parent]() { Highlight(parent); });
connect(parent, &QTextDocument::contentsChanged, this, [this, parent] { Highlight(parent); });
}
void QComboBoxWithMouseWheelDisabled::wheelEvent(QWheelEvent* event)

View File

@ -990,15 +990,15 @@ void CalibrationWidget::SetupActions()
const auto center_action = new QAction(tr("Center and Calibrate"), this);
const auto reset_action = new QAction(tr("Reset"), this);
connect(calibrate_action, &QAction::triggered, [this]() {
connect(calibrate_action, &QAction::triggered, [this] {
StartCalibration();
m_new_center = Common::DVec2{};
});
connect(center_action, &QAction::triggered, [this]() {
connect(center_action, &QAction::triggered, [this] {
StartCalibration();
m_new_center = std::nullopt;
});
connect(reset_action, &QAction::triggered, [this]() {
connect(reset_action, &QAction::triggered, [this] {
m_input.SetCalibrationToDefault();
m_input.SetCenter({0, 0});
});
@ -1012,7 +1012,7 @@ void CalibrationWidget::SetupActions()
setDefaultAction(calibrate_action);
m_completion_action = new QAction(tr("Finish Calibration"), this);
connect(m_completion_action, &QAction::triggered, [this]() {
connect(m_completion_action, &QAction::triggered, [this] {
m_input.SetCenter(GetCenter());
m_input.SetCalibrationData(std::move(m_calibration_data));
m_informative_timer->stop();
@ -1027,7 +1027,7 @@ void CalibrationWidget::StartCalibration()
// Cancel calibration.
const auto cancel_action = new QAction(tr("Cancel Calibration"), this);
connect(cancel_action, &QAction::triggered, [this]() {
connect(cancel_action, &QAction::triggered, [this] {
m_calibration_data.clear();
m_informative_timer->stop();
SetupActions();

View File

@ -343,7 +343,7 @@ void MappingWidget::CreateControl(const ControllerEmu::Control* control, QFormLa
if (m_previous_mapping_button)
{
connect(m_previous_mapping_button, &MappingButton::QueueNextButtonMapping,
[this, button]() { m_parent->QueueInputDetection(button); });
[this, button] { m_parent->QueueInputDetection(button); });
}
m_previous_mapping_button = button;
}
@ -383,7 +383,7 @@ MappingWidget::CreateSettingAdvancedMappingButton(ControllerEmu::NumericSettingB
const auto button = new QPushButton(tr("..."));
button->setFixedWidth(QFontMetrics(font()).boundingRect(button->text()).width() * 2);
button->connect(button, &QPushButton::clicked, [this, &setting]() {
button->connect(button, &QPushButton::clicked, [this, &setting] {
if (setting.IsSimpleValue())
setting.SetExpressionFromValue();