From 57ef2ec3992a4195905b2f6c23588b3033c674e0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jean-Micha=C3=ABl=20Celerier?= Date: Tue, 31 Dec 2024 15:17:22 -0500 Subject: [PATCH] ci: msvc fix --- .../Bitfocus/BitfocusProtocolSettingsWidget.cpp | 11 +++++------ .../Bitfocus/BitfocusProtocolSettingsWidget.hpp | 2 +- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/src/plugins/score-plugin-protocols/Protocols/Bitfocus/BitfocusProtocolSettingsWidget.cpp b/src/plugins/score-plugin-protocols/Protocols/Bitfocus/BitfocusProtocolSettingsWidget.cpp index 28be04e2e9..4848c83a0d 100644 --- a/src/plugins/score-plugin-protocols/Protocols/Bitfocus/BitfocusProtocolSettingsWidget.cpp +++ b/src/plugins/score-plugin-protocols/Protocols/Bitfocus/BitfocusProtocolSettingsWidget.cpp @@ -98,8 +98,7 @@ void BitfocusProtocolSettingsWidget::updateFields() static_text->setText(str); m_subForm->addWidget(static_text); - m_widgets[field.id] - = widget{.label = lab, .widget = static_text, .getValue = {}}; + m_widgets[field.id] = widget{.label = lab, .widg = static_text, .getValue = {}}; } } else if(field.type == "textinput" || field.type == "bonjourdevice") @@ -115,7 +114,7 @@ void BitfocusProtocolSettingsWidget::updateFields() widg->setText(field.default_value.toString()); m_subForm->addWidget(widg); m_widgets[field.id] - = {.label = lab, .widget = widg, .getValue = [widg]() -> QVariant { + = {.label = lab, .widg = widg, .getValue = [widg]() -> QVariant { return widg->text(); }}; } @@ -126,7 +125,7 @@ void BitfocusProtocolSettingsWidget::updateFields() widg->setValue(field.default_value.toDouble()); m_subForm->addWidget(widg); m_widgets[field.id] - = {.label = lab, .widget = widg, .getValue = [widg]() -> QVariant { + = {.label = lab, .widg = widg, .getValue = [widg]() -> QVariant { return widg->value(); }}; } @@ -136,7 +135,7 @@ void BitfocusProtocolSettingsWidget::updateFields() widg->setChecked(field.default_value.toBool() == true); m_subForm->addWidget(widg); m_widgets[field.id] - = {.label = lab, .widget = widg, .getValue = [widg]() -> QVariant { + = {.label = lab, .widg = widg, .getValue = [widg]() -> QVariant { return widg->isChecked(); }}; } @@ -158,7 +157,7 @@ void BitfocusProtocolSettingsWidget::updateFields() m_subForm->addWidget(widg); m_widgets[field.id] - = {.label = lab, .widget = widg, .getValue = [widg]() -> QVariant { + = {.label = lab, .widg = widg, .getValue = [widg]() -> QVariant { return widg->currentData(); }}; } diff --git a/src/plugins/score-plugin-protocols/Protocols/Bitfocus/BitfocusProtocolSettingsWidget.hpp b/src/plugins/score-plugin-protocols/Protocols/Bitfocus/BitfocusProtocolSettingsWidget.hpp index 7ac54c1631..cad8364cb7 100644 --- a/src/plugins/score-plugin-protocols/Protocols/Bitfocus/BitfocusProtocolSettingsWidget.hpp +++ b/src/plugins/score-plugin-protocols/Protocols/Bitfocus/BitfocusProtocolSettingsWidget.hpp @@ -46,7 +46,7 @@ class BitfocusProtocolSettingsWidget final : public Device::ProtocolSettingsWidg struct widget { QLabel* label{}; - QWidget* widget{}; + QWidget* widg{}; std::function getValue; };