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