mirror of
https://git.suyu.dev/suyu/suyu.git
synced 2024-12-27 10:50:57 +01:00
configuration: Use std::make_unique instead of operator new for ui
This commit is contained in:
parent
c68ce25a14
commit
ab441fb009
13 changed files with 15 additions and 14 deletions
|
@ -8,7 +8,8 @@
|
|||
#include "ui_aboutdialog.h"
|
||||
#include "yuzu/about_dialog.h"
|
||||
|
||||
AboutDialog::AboutDialog(QWidget* parent) : QDialog(parent), ui(new Ui::AboutDialog) {
|
||||
AboutDialog::AboutDialog(QWidget* parent)
|
||||
: QDialog(parent), ui{std::make_unique<Ui::AboutDialog>()} {
|
||||
const auto branch_name = std::string(Common::g_scm_branch);
|
||||
const auto description = std::string(Common::g_scm_desc);
|
||||
const auto build_id = std::string(Common::g_build_id);
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
#include "yuzu/configuration/configure_cpu.h"
|
||||
|
||||
ConfigureCpu::ConfigureCpu(const Core::System& system_, QWidget* parent)
|
||||
: QWidget(parent), ui(new Ui::ConfigureCpu), system{system_} {
|
||||
: QWidget(parent), ui{std::make_unique<Ui::ConfigureCpu>()}, system{system_} {
|
||||
ui->setupUi(this);
|
||||
|
||||
SetupPerGameUI();
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
#include "yuzu/configuration/configure_cpu_debug.h"
|
||||
|
||||
ConfigureCpuDebug::ConfigureCpuDebug(const Core::System& system_, QWidget* parent)
|
||||
: QWidget(parent), ui(new Ui::ConfigureCpuDebug), system{system_} {
|
||||
: QWidget(parent), ui{std::make_unique<Ui::ConfigureCpuDebug>()}, system{system_} {
|
||||
ui->setupUi(this);
|
||||
|
||||
SetConfiguration();
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
#include "yuzu/uisettings.h"
|
||||
|
||||
ConfigureDebug::ConfigureDebug(const Core::System& system_, QWidget* parent)
|
||||
: QWidget(parent), ui(new Ui::ConfigureDebug), system{system_} {
|
||||
: QWidget(parent), ui{std::make_unique<Ui::ConfigureDebug>()}, system{system_} {
|
||||
ui->setupUi(this);
|
||||
SetConfiguration();
|
||||
|
||||
|
|
|
@ -9,8 +9,8 @@
|
|||
#include "yuzu/configuration/configure_debug_tab.h"
|
||||
|
||||
ConfigureDebugTab::ConfigureDebugTab(const Core::System& system_, QWidget* parent)
|
||||
: QWidget(parent),
|
||||
ui(new Ui::ConfigureDebugTab), debug_tab{std::make_unique<ConfigureDebug>(system_, this)},
|
||||
: QWidget(parent), ui{std::make_unique<Ui::ConfigureDebugTab>()},
|
||||
debug_tab{std::make_unique<ConfigureDebug>(system_, this)},
|
||||
cpu_debug_tab{std::make_unique<ConfigureCpuDebug>(system_, this)} {
|
||||
ui->setupUi(this);
|
||||
|
||||
|
|
|
@ -36,7 +36,7 @@
|
|||
ConfigureDialog::ConfigureDialog(QWidget* parent, HotkeyRegistry& registry,
|
||||
InputCommon::InputSubsystem* input_subsystem,
|
||||
Core::System& system_)
|
||||
: QDialog(parent), ui(new Ui::ConfigureDialog),
|
||||
: QDialog(parent), ui{std::make_unique<Ui::ConfigureDialog>()},
|
||||
registry(registry), system{system_}, audio_tab{std::make_unique<ConfigureAudio>(system_,
|
||||
this)},
|
||||
cpu_tab{std::make_unique<ConfigureCpu>(system_, this)},
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
#include "yuzu/uisettings.h"
|
||||
|
||||
ConfigureGeneral::ConfigureGeneral(const Core::System& system_, QWidget* parent)
|
||||
: QWidget(parent), ui(new Ui::ConfigureGeneral), system{system_} {
|
||||
: QWidget(parent), ui{std::make_unique<Ui::ConfigureGeneral>()}, system{system_} {
|
||||
ui->setupUi(this);
|
||||
|
||||
SetupPerGameUI();
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
#include "yuzu/configuration/configure_graphics.h"
|
||||
|
||||
ConfigureGraphics::ConfigureGraphics(const Core::System& system_, QWidget* parent)
|
||||
: QWidget(parent), ui(new Ui::ConfigureGraphics), system{system_} {
|
||||
: QWidget(parent), ui{std::make_unique<Ui::ConfigureGraphics>()}, system{system_} {
|
||||
vulkan_device = Settings::values.vulkan_device.GetValue();
|
||||
RetrieveVulkanDevices();
|
||||
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
#include "yuzu/configuration/configure_graphics_advanced.h"
|
||||
|
||||
ConfigureGraphicsAdvanced::ConfigureGraphicsAdvanced(const Core::System& system_, QWidget* parent)
|
||||
: QWidget(parent), ui(new Ui::ConfigureGraphicsAdvanced), system{system_} {
|
||||
: QWidget(parent), ui{std::make_unique<Ui::ConfigureGraphicsAdvanced>()}, system{system_} {
|
||||
|
||||
ui->setupUi(this);
|
||||
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
#include "yuzu/util/util.h"
|
||||
|
||||
ConfigurePerGameAddons::ConfigurePerGameAddons(Core::System& system_, QWidget* parent)
|
||||
: QWidget(parent), ui(new Ui::ConfigurePerGameAddons), system{system_} {
|
||||
: QWidget(parent), ui{std::make_unique<Ui::ConfigurePerGameAddons>()}, system{system_} {
|
||||
ui->setupUi(this);
|
||||
|
||||
layout = new QVBoxLayout;
|
||||
|
|
|
@ -77,7 +77,7 @@ QString GetProfileUsernameFromUser(QWidget* parent, const QString& description_t
|
|||
} // Anonymous namespace
|
||||
|
||||
ConfigureProfileManager::ConfigureProfileManager(const Core::System& system_, QWidget* parent)
|
||||
: QWidget(parent), ui(new Ui::ConfigureProfileManager),
|
||||
: QWidget(parent), ui{std::make_unique<Ui::ConfigureProfileManager>()},
|
||||
profile_manager(std::make_unique<Service::Account::ProfileManager>()), system{system_} {
|
||||
ui->setupUi(this);
|
||||
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
#include "yuzu/configuration/configure_system.h"
|
||||
|
||||
ConfigureSystem::ConfigureSystem(Core::System& system_, QWidget* parent)
|
||||
: QWidget(parent), ui(new Ui::ConfigureSystem), system{system_} {
|
||||
: QWidget(parent), ui{std::make_unique<Ui::ConfigureSystem>()}, system{system_} {
|
||||
ui->setupUi(this);
|
||||
connect(ui->button_regenerate_console_id, &QPushButton::clicked, this,
|
||||
&ConfigureSystem::RefreshConsoleID);
|
||||
|
|
|
@ -55,7 +55,7 @@ QString GetTranslatedRowTextName(size_t index) {
|
|||
} // Anonymous namespace
|
||||
|
||||
ConfigureUi::ConfigureUi(Core::System& system_, QWidget* parent)
|
||||
: QWidget(parent), ui(new Ui::ConfigureUi), system{system_} {
|
||||
: QWidget(parent), ui{std::make_unique<Ui::ConfigureUi>()}, system{system_} {
|
||||
ui->setupUi(this);
|
||||
|
||||
InitializeLanguageComboBox();
|
||||
|
|
Loading…
Reference in a new issue