aboutsummaryrefslogtreecommitdiff
path: root/src/yuzu/configuration/configure_dialog.cpp
diff options
context:
space:
mode:
authorlat9nq <22451773+lat9nq@users.noreply.github.com>2023-06-21 01:42:42 -0400
committerlat9nq <22451773+lat9nq@users.noreply.github.com>2023-07-21 10:56:55 -0400
commitad645c29a44bd117cad90bda56e1f4d6296f2666 (patch)
tree6301d2470cd09ea5ef3bd4007d1aa1c97fe7717d /src/yuzu/configuration/configure_dialog.cpp
parent62ffaa730fabd2101947dd28e50fae6d03162aa4 (diff)
configuration: Use a builder to create widgets
This gets rid of some repeated code and sets us up to send more information to the new widget.
Diffstat (limited to 'src/yuzu/configuration/configure_dialog.cpp')
-rw-r--r--src/yuzu/configuration/configure_dialog.cpp23
1 files changed, 9 insertions, 14 deletions
diff --git a/src/yuzu/configuration/configure_dialog.cpp b/src/yuzu/configuration/configure_dialog.cpp
index c7d132fc86..183555acd5 100644
--- a/src/yuzu/configuration/configure_dialog.cpp
+++ b/src/yuzu/configuration/configure_dialog.cpp
@@ -32,28 +32,23 @@ ConfigureDialog::ConfigureDialog(QWidget* parent, HotkeyRegistry& registry_,
std::vector<VkDeviceInfo::Record>& vk_device_records,
Core::System& system_, bool enable_web_config)
: QDialog(parent), ui{std::make_unique<Ui::ConfigureDialog>()},
- registry(registry_), system{system_},
- translations{ConfigurationShared::InitializeTranslations(this)},
- combobox_translations{ConfigurationShared::ComboboxEnumeration(this)},
- audio_tab{std::make_unique<ConfigureAudio>(system_, nullptr, *translations,
- *combobox_translations, this)},
- cpu_tab{std::make_unique<ConfigureCpu>(system_, nullptr, *translations,
- *combobox_translations, this)},
+ registry(registry_), system{system_}, builder{std::make_unique<ConfigurationShared::Builder>(
+ this, !system_.IsPoweredOn())},
+ audio_tab{std::make_unique<ConfigureAudio>(system_, nullptr, *builder, this)},
+ cpu_tab{std::make_unique<ConfigureCpu>(system_, nullptr, *builder, this)},
debug_tab_tab{std::make_unique<ConfigureDebugTab>(system_, this)},
filesystem_tab{std::make_unique<ConfigureFilesystem>(this)},
- general_tab{std::make_unique<ConfigureGeneral>(system_, nullptr, *translations,
- *combobox_translations, this)},
- graphics_advanced_tab{std::make_unique<ConfigureGraphicsAdvanced>(
- system_, nullptr, *translations, *combobox_translations, this)},
+ general_tab{std::make_unique<ConfigureGeneral>(system_, nullptr, *builder, this)},
+ graphics_advanced_tab{
+ std::make_unique<ConfigureGraphicsAdvanced>(system_, nullptr, *builder, this)},
graphics_tab{std::make_unique<ConfigureGraphics>(
system_, vk_device_records, [&]() { graphics_advanced_tab->ExposeComputeOption(); },
- nullptr, *translations, *combobox_translations, this)},
+ nullptr, *builder, this)},
hotkeys_tab{std::make_unique<ConfigureHotkeys>(system_.HIDCore(), this)},
input_tab{std::make_unique<ConfigureInput>(system_, this)},
network_tab{std::make_unique<ConfigureNetwork>(system_, this)},
profile_tab{std::make_unique<ConfigureProfileManager>(system_, this)},
- system_tab{std::make_unique<ConfigureSystem>(system_, nullptr, *translations,
- *combobox_translations, this)},
+ system_tab{std::make_unique<ConfigureSystem>(system_, nullptr, *builder, this)},
ui_tab{std::make_unique<ConfigureUi>(system_, this)}, web_tab{std::make_unique<ConfigureWeb>(
this)} {
Settings::SetConfiguringGlobal(true);