|
|
@ -515,9 +515,9 @@ void Widget::SetupComponent(const QString& label, std::function<void()>& load_fu |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
const bool require_checkbox = |
|
|
const bool require_checkbox = |
|
|
other_setting != nullptr && other_setting->TypeId() == typeid(bool); |
|
|
|
|
|
|
|
|
other_setting != nullptr && other_setting->ToString() == "bool"; |
|
|
|
|
|
|
|
|
if (other_setting != nullptr && other_setting->TypeId() != typeid(bool)) { |
|
|
|
|
|
|
|
|
if (other_setting != nullptr && other_setting->TypeId() != "bool") { |
|
|
LOG_WARNING( |
|
|
LOG_WARNING( |
|
|
Frontend, |
|
|
Frontend, |
|
|
"Extra setting \"{}\" specified but is not bool, refusing to create checkbox for it.", |
|
|
"Extra setting \"{}\" specified but is not bool, refusing to create checkbox for it.", |
|
|
@ -575,12 +575,12 @@ void Widget::SetupComponent(const QString& label, std::function<void()>& load_fu |
|
|
QWidget* lhs = |
|
|
QWidget* lhs = |
|
|
CreateCheckBox(other_setting, label, checkbox_serializer, checkbox_restore_func, touch); |
|
|
CreateCheckBox(other_setting, label, checkbox_serializer, checkbox_restore_func, touch); |
|
|
layout->addWidget(lhs, 1); |
|
|
layout->addWidget(lhs, 1); |
|
|
} else if (setting.TypeId() != typeid(bool)) { |
|
|
|
|
|
|
|
|
} else if (setting.TypeId() != "bool") { |
|
|
QLabel* qt_label = CreateLabel(label); |
|
|
QLabel* qt_label = CreateLabel(label); |
|
|
layout->addWidget(qt_label, 1); |
|
|
layout->addWidget(qt_label, 1); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
if (setting.TypeId() == typeid(bool)) { |
|
|
|
|
|
|
|
|
if (setting.TypeId() == "bool") { |
|
|
data_component = CreateCheckBox(&setting, label, serializer, restore_func, touch); |
|
|
data_component = CreateCheckBox(&setting, label, serializer, restore_func, touch); |
|
|
} else if (setting.IsEnum()) { |
|
|
} else if (setting.IsEnum()) { |
|
|
if (request == RequestType::RadioGroup) { |
|
|
if (request == RequestType::RadioGroup) { |
|
|
@ -629,7 +629,7 @@ void Widget::SetupComponent(const QString& label, std::function<void()>& load_fu |
|
|
default: |
|
|
default: |
|
|
UNIMPLEMENTED(); |
|
|
UNIMPLEMENTED(); |
|
|
} |
|
|
} |
|
|
} else if (type == typeid(std::string)) { |
|
|
|
|
|
|
|
|
} else if (type == "string") { |
|
|
switch (request) { |
|
|
switch (request) { |
|
|
case RequestType::Default: |
|
|
case RequestType::Default: |
|
|
case RequestType::LineEdit: |
|
|
case RequestType::LineEdit: |
|
|
|