configuration: Add const qualifier where able
This commit is contained in:
parent
fb66a455c4
commit
493905665c
|
@ -14,7 +14,7 @@
|
||||||
#include "yuzu/configuration/configuration_shared.h"
|
#include "yuzu/configuration/configuration_shared.h"
|
||||||
#include "yuzu/configuration/configure_audio.h"
|
#include "yuzu/configuration/configure_audio.h"
|
||||||
|
|
||||||
ConfigureAudio::ConfigureAudio(Core::System& system_, QWidget* parent)
|
ConfigureAudio::ConfigureAudio(const Core::System& system_, QWidget* parent)
|
||||||
: QWidget(parent), ui(std::make_unique<Ui::ConfigureAudio>()), system{system_} {
|
: QWidget(parent), ui(std::make_unique<Ui::ConfigureAudio>()), system{system_} {
|
||||||
ui->setupUi(this);
|
ui->setupUi(this);
|
||||||
|
|
||||||
|
@ -32,7 +32,7 @@ ConfigureAudio::ConfigureAudio(Core::System& system_, QWidget* parent)
|
||||||
|
|
||||||
SetConfiguration();
|
SetConfiguration();
|
||||||
|
|
||||||
const bool is_powered_on = system.IsPoweredOn();
|
const bool is_powered_on = system_.IsPoweredOn();
|
||||||
ui->output_sink_combo_box->setEnabled(!is_powered_on);
|
ui->output_sink_combo_box->setEnabled(!is_powered_on);
|
||||||
ui->audio_device_combo_box->setEnabled(!is_powered_on);
|
ui->audio_device_combo_box->setEnabled(!is_powered_on);
|
||||||
}
|
}
|
||||||
|
|
|
@ -23,7 +23,7 @@ class ConfigureAudio : public QWidget {
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
explicit ConfigureAudio(Core::System& system_, QWidget* parent = nullptr);
|
explicit ConfigureAudio(const Core::System& system_, QWidget* parent = nullptr);
|
||||||
~ConfigureAudio() override;
|
~ConfigureAudio() override;
|
||||||
|
|
||||||
void ApplyConfiguration();
|
void ApplyConfiguration();
|
||||||
|
@ -46,5 +46,5 @@ private:
|
||||||
|
|
||||||
std::unique_ptr<Ui::ConfigureAudio> ui;
|
std::unique_ptr<Ui::ConfigureAudio> ui;
|
||||||
|
|
||||||
Core::System& system;
|
const Core::System& system;
|
||||||
};
|
};
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
#include "yuzu/configuration/configuration_shared.h"
|
#include "yuzu/configuration/configuration_shared.h"
|
||||||
#include "yuzu/configuration/configure_cpu.h"
|
#include "yuzu/configuration/configure_cpu.h"
|
||||||
|
|
||||||
ConfigureCpu::ConfigureCpu(Core::System& system_, QWidget* parent)
|
ConfigureCpu::ConfigureCpu(const Core::System& system_, QWidget* parent)
|
||||||
: QWidget(parent), ui(new Ui::ConfigureCpu), system{system_} {
|
: QWidget(parent), ui(new Ui::ConfigureCpu), system{system_} {
|
||||||
ui->setupUi(this);
|
ui->setupUi(this);
|
||||||
|
|
||||||
|
|
|
@ -24,7 +24,7 @@ class ConfigureCpu : public QWidget {
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
explicit ConfigureCpu(Core::System& system_, QWidget* parent = nullptr);
|
explicit ConfigureCpu(const Core::System& system_, QWidget* parent = nullptr);
|
||||||
~ConfigureCpu() override;
|
~ConfigureCpu() override;
|
||||||
|
|
||||||
void ApplyConfiguration();
|
void ApplyConfiguration();
|
||||||
|
@ -46,5 +46,5 @@ private:
|
||||||
ConfigurationShared::CheckState cpuopt_unsafe_inaccurate_nan;
|
ConfigurationShared::CheckState cpuopt_unsafe_inaccurate_nan;
|
||||||
ConfigurationShared::CheckState cpuopt_unsafe_fastmem_check;
|
ConfigurationShared::CheckState cpuopt_unsafe_fastmem_check;
|
||||||
|
|
||||||
Core::System& system;
|
const Core::System& system;
|
||||||
};
|
};
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
#include "ui_configure_cpu_debug.h"
|
#include "ui_configure_cpu_debug.h"
|
||||||
#include "yuzu/configuration/configure_cpu_debug.h"
|
#include "yuzu/configuration/configure_cpu_debug.h"
|
||||||
|
|
||||||
ConfigureCpuDebug::ConfigureCpuDebug(Core::System& system_, QWidget* parent)
|
ConfigureCpuDebug::ConfigureCpuDebug(const Core::System& system_, QWidget* parent)
|
||||||
: QWidget(parent), ui(new Ui::ConfigureCpuDebug), system{system_} {
|
: QWidget(parent), ui(new Ui::ConfigureCpuDebug), system{system_} {
|
||||||
ui->setupUi(this);
|
ui->setupUi(this);
|
||||||
|
|
||||||
|
|
|
@ -19,7 +19,7 @@ class ConfigureCpuDebug : public QWidget {
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
explicit ConfigureCpuDebug(Core::System& system_, QWidget* parent = nullptr);
|
explicit ConfigureCpuDebug(const Core::System& system_, QWidget* parent = nullptr);
|
||||||
~ConfigureCpuDebug() override;
|
~ConfigureCpuDebug() override;
|
||||||
|
|
||||||
void ApplyConfiguration();
|
void ApplyConfiguration();
|
||||||
|
@ -32,5 +32,5 @@ private:
|
||||||
|
|
||||||
std::unique_ptr<Ui::ConfigureCpuDebug> ui;
|
std::unique_ptr<Ui::ConfigureCpuDebug> ui;
|
||||||
|
|
||||||
Core::System& system;
|
const Core::System& system;
|
||||||
};
|
};
|
||||||
|
|
|
@ -14,7 +14,7 @@
|
||||||
#include "yuzu/debugger/console.h"
|
#include "yuzu/debugger/console.h"
|
||||||
#include "yuzu/uisettings.h"
|
#include "yuzu/uisettings.h"
|
||||||
|
|
||||||
ConfigureDebug::ConfigureDebug(Core::System& system_, QWidget* parent)
|
ConfigureDebug::ConfigureDebug(const Core::System& system_, QWidget* parent)
|
||||||
: QWidget(parent), ui(new Ui::ConfigureDebug), system{system_} {
|
: QWidget(parent), ui(new Ui::ConfigureDebug), system{system_} {
|
||||||
ui->setupUi(this);
|
ui->setupUi(this);
|
||||||
SetConfiguration();
|
SetConfiguration();
|
||||||
|
|
|
@ -19,7 +19,7 @@ class ConfigureDebug : public QWidget {
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
explicit ConfigureDebug(Core::System& system_, QWidget* parent = nullptr);
|
explicit ConfigureDebug(const Core::System& system_, QWidget* parent = nullptr);
|
||||||
~ConfigureDebug() override;
|
~ConfigureDebug() override;
|
||||||
|
|
||||||
void ApplyConfiguration();
|
void ApplyConfiguration();
|
||||||
|
@ -32,5 +32,5 @@ private:
|
||||||
|
|
||||||
std::unique_ptr<Ui::ConfigureDebug> ui;
|
std::unique_ptr<Ui::ConfigureDebug> ui;
|
||||||
|
|
||||||
Core::System& system;
|
const Core::System& system;
|
||||||
};
|
};
|
||||||
|
|
|
@ -8,10 +8,9 @@
|
||||||
#include "yuzu/configuration/configure_debug.h"
|
#include "yuzu/configuration/configure_debug.h"
|
||||||
#include "yuzu/configuration/configure_debug_tab.h"
|
#include "yuzu/configuration/configure_debug_tab.h"
|
||||||
|
|
||||||
ConfigureDebugTab::ConfigureDebugTab(Core::System& system_, QWidget* parent)
|
ConfigureDebugTab::ConfigureDebugTab(const Core::System& system_, QWidget* parent)
|
||||||
: QWidget(parent),
|
: QWidget(parent),
|
||||||
ui(new Ui::ConfigureDebugTab), system{system_}, debug_tab{std::make_unique<ConfigureDebug>(
|
ui(new Ui::ConfigureDebugTab), debug_tab{std::make_unique<ConfigureDebug>(system_, this)},
|
||||||
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);
|
||||||
|
|
||||||
|
|
|
@ -22,7 +22,7 @@ class ConfigureDebugTab : public QWidget {
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
explicit ConfigureDebugTab(Core::System& system_, QWidget* parent = nullptr);
|
explicit ConfigureDebugTab(const Core::System& system_, QWidget* parent = nullptr);
|
||||||
~ConfigureDebugTab() override;
|
~ConfigureDebugTab() override;
|
||||||
|
|
||||||
void ApplyConfiguration();
|
void ApplyConfiguration();
|
||||||
|
@ -37,8 +37,6 @@ private:
|
||||||
|
|
||||||
std::unique_ptr<Ui::ConfigureDebugTab> ui;
|
std::unique_ptr<Ui::ConfigureDebugTab> ui;
|
||||||
|
|
||||||
Core::System& system;
|
|
||||||
|
|
||||||
std::unique_ptr<ConfigureDebug> debug_tab;
|
std::unique_ptr<ConfigureDebug> debug_tab;
|
||||||
std::unique_ptr<ConfigureCpuDebug> cpu_debug_tab;
|
std::unique_ptr<ConfigureCpuDebug> cpu_debug_tab;
|
||||||
};
|
};
|
||||||
|
|
|
@ -15,7 +15,7 @@
|
||||||
#include "yuzu/configuration/configure_general.h"
|
#include "yuzu/configuration/configure_general.h"
|
||||||
#include "yuzu/uisettings.h"
|
#include "yuzu/uisettings.h"
|
||||||
|
|
||||||
ConfigureGeneral::ConfigureGeneral(Core::System& system_, QWidget* parent)
|
ConfigureGeneral::ConfigureGeneral(const Core::System& system_, QWidget* parent)
|
||||||
: QWidget(parent), ui(new Ui::ConfigureGeneral), system{system_} {
|
: QWidget(parent), ui(new Ui::ConfigureGeneral), system{system_} {
|
||||||
ui->setupUi(this);
|
ui->setupUi(this);
|
||||||
|
|
||||||
|
|
|
@ -28,7 +28,7 @@ class ConfigureGeneral : public QWidget {
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
explicit ConfigureGeneral(Core::System& system_, QWidget* parent = nullptr);
|
explicit ConfigureGeneral(const Core::System& system_, QWidget* parent = nullptr);
|
||||||
~ConfigureGeneral() override;
|
~ConfigureGeneral() override;
|
||||||
|
|
||||||
void SetResetCallback(std::function<void()> callback);
|
void SetResetCallback(std::function<void()> callback);
|
||||||
|
@ -49,5 +49,5 @@ private:
|
||||||
ConfigurationShared::CheckState use_speed_limit;
|
ConfigurationShared::CheckState use_speed_limit;
|
||||||
ConfigurationShared::CheckState use_multi_core;
|
ConfigurationShared::CheckState use_multi_core;
|
||||||
|
|
||||||
Core::System& system;
|
const Core::System& system;
|
||||||
};
|
};
|
||||||
|
|
|
@ -19,7 +19,7 @@
|
||||||
#include "yuzu/configuration/configuration_shared.h"
|
#include "yuzu/configuration/configuration_shared.h"
|
||||||
#include "yuzu/configuration/configure_graphics.h"
|
#include "yuzu/configuration/configure_graphics.h"
|
||||||
|
|
||||||
ConfigureGraphics::ConfigureGraphics(Core::System& system_, QWidget* parent)
|
ConfigureGraphics::ConfigureGraphics(const Core::System& system_, QWidget* parent)
|
||||||
: QWidget(parent), ui(new Ui::ConfigureGraphics), system{system_} {
|
: QWidget(parent), ui(new Ui::ConfigureGraphics), system{system_} {
|
||||||
vulkan_device = Settings::values.vulkan_device.GetValue();
|
vulkan_device = Settings::values.vulkan_device.GetValue();
|
||||||
RetrieveVulkanDevices();
|
RetrieveVulkanDevices();
|
||||||
|
|
|
@ -26,7 +26,7 @@ class ConfigureGraphics : public QWidget {
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
explicit ConfigureGraphics(Core::System& system_, QWidget* parent = nullptr);
|
explicit ConfigureGraphics(const Core::System& system_, QWidget* parent = nullptr);
|
||||||
~ConfigureGraphics() override;
|
~ConfigureGraphics() override;
|
||||||
|
|
||||||
void ApplyConfiguration();
|
void ApplyConfiguration();
|
||||||
|
@ -60,5 +60,5 @@ private:
|
||||||
u32 vulkan_device{};
|
u32 vulkan_device{};
|
||||||
Settings::ShaderBackend shader_backend{};
|
Settings::ShaderBackend shader_backend{};
|
||||||
|
|
||||||
Core::System& system;
|
const Core::System& system;
|
||||||
};
|
};
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
#include "yuzu/configuration/configuration_shared.h"
|
#include "yuzu/configuration/configuration_shared.h"
|
||||||
#include "yuzu/configuration/configure_graphics_advanced.h"
|
#include "yuzu/configuration/configure_graphics_advanced.h"
|
||||||
|
|
||||||
ConfigureGraphicsAdvanced::ConfigureGraphicsAdvanced(Core::System& system_, QWidget* parent)
|
ConfigureGraphicsAdvanced::ConfigureGraphicsAdvanced(const Core::System& system_, QWidget* parent)
|
||||||
: QWidget(parent), ui(new Ui::ConfigureGraphicsAdvanced), system{system_} {
|
: QWidget(parent), ui(new Ui::ConfigureGraphicsAdvanced), system{system_} {
|
||||||
|
|
||||||
ui->setupUi(this);
|
ui->setupUi(this);
|
||||||
|
|
|
@ -23,7 +23,7 @@ class ConfigureGraphicsAdvanced : public QWidget {
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
explicit ConfigureGraphicsAdvanced(Core::System& system_, QWidget* parent = nullptr);
|
explicit ConfigureGraphicsAdvanced(const Core::System& system_, QWidget* parent = nullptr);
|
||||||
~ConfigureGraphicsAdvanced() override;
|
~ConfigureGraphicsAdvanced() override;
|
||||||
|
|
||||||
void ApplyConfiguration();
|
void ApplyConfiguration();
|
||||||
|
@ -41,5 +41,5 @@ private:
|
||||||
ConfigurationShared::CheckState use_asynchronous_shaders;
|
ConfigurationShared::CheckState use_asynchronous_shaders;
|
||||||
ConfigurationShared::CheckState use_fast_gpu_time;
|
ConfigurationShared::CheckState use_fast_gpu_time;
|
||||||
|
|
||||||
Core::System& system;
|
const Core::System& system;
|
||||||
};
|
};
|
||||||
|
|
|
@ -76,7 +76,7 @@ QString GetProfileUsernameFromUser(QWidget* parent, const QString& description_t
|
||||||
}
|
}
|
||||||
} // Anonymous namespace
|
} // Anonymous namespace
|
||||||
|
|
||||||
ConfigureProfileManager::ConfigureProfileManager(Core::System& system_, QWidget* parent)
|
ConfigureProfileManager::ConfigureProfileManager(const Core::System& system_, QWidget* parent)
|
||||||
: QWidget(parent), ui(new Ui::ConfigureProfileManager),
|
: QWidget(parent), ui(new 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);
|
||||||
|
|
|
@ -31,7 +31,7 @@ class ConfigureProfileManager : public QWidget {
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
explicit ConfigureProfileManager(Core::System& system_, QWidget* parent = nullptr);
|
explicit ConfigureProfileManager(const Core::System& system_, QWidget* parent = nullptr);
|
||||||
~ConfigureProfileManager() override;
|
~ConfigureProfileManager() override;
|
||||||
|
|
||||||
void ApplyConfiguration();
|
void ApplyConfiguration();
|
||||||
|
@ -63,5 +63,5 @@ private:
|
||||||
|
|
||||||
std::unique_ptr<Service::Account::ProfileManager> profile_manager;
|
std::unique_ptr<Service::Account::ProfileManager> profile_manager;
|
||||||
|
|
||||||
Core::System& system;
|
const Core::System& system;
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue