mirror of
https://github.com/yuzu-emu/yuzu-android.git
synced 2024-12-28 10:55:45 +00:00
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/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_} {
|
||||
ui->setupUi(this);
|
||||
|
||||
|
@ -32,7 +32,7 @@ ConfigureAudio::ConfigureAudio(Core::System& system_, QWidget* parent)
|
|||
|
||||
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->audio_device_combo_box->setEnabled(!is_powered_on);
|
||||
}
|
||||
|
|
|
@ -23,7 +23,7 @@ class ConfigureAudio : public QWidget {
|
|||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit ConfigureAudio(Core::System& system_, QWidget* parent = nullptr);
|
||||
explicit ConfigureAudio(const Core::System& system_, QWidget* parent = nullptr);
|
||||
~ConfigureAudio() override;
|
||||
|
||||
void ApplyConfiguration();
|
||||
|
@ -46,5 +46,5 @@ private:
|
|||
|
||||
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/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_} {
|
||||
ui->setupUi(this);
|
||||
|
||||
|
|
|
@ -24,7 +24,7 @@ class ConfigureCpu : public QWidget {
|
|||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit ConfigureCpu(Core::System& system_, QWidget* parent = nullptr);
|
||||
explicit ConfigureCpu(const Core::System& system_, QWidget* parent = nullptr);
|
||||
~ConfigureCpu() override;
|
||||
|
||||
void ApplyConfiguration();
|
||||
|
@ -46,5 +46,5 @@ private:
|
|||
ConfigurationShared::CheckState cpuopt_unsafe_inaccurate_nan;
|
||||
ConfigurationShared::CheckState cpuopt_unsafe_fastmem_check;
|
||||
|
||||
Core::System& system;
|
||||
const Core::System& system;
|
||||
};
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
#include "ui_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_} {
|
||||
ui->setupUi(this);
|
||||
|
||||
|
|
|
@ -19,7 +19,7 @@ class ConfigureCpuDebug : public QWidget {
|
|||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit ConfigureCpuDebug(Core::System& system_, QWidget* parent = nullptr);
|
||||
explicit ConfigureCpuDebug(const Core::System& system_, QWidget* parent = nullptr);
|
||||
~ConfigureCpuDebug() override;
|
||||
|
||||
void ApplyConfiguration();
|
||||
|
@ -32,5 +32,5 @@ private:
|
|||
|
||||
std::unique_ptr<Ui::ConfigureCpuDebug> ui;
|
||||
|
||||
Core::System& system;
|
||||
const Core::System& system;
|
||||
};
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
#include "yuzu/debugger/console.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_} {
|
||||
ui->setupUi(this);
|
||||
SetConfiguration();
|
||||
|
|
|
@ -19,7 +19,7 @@ class ConfigureDebug : public QWidget {
|
|||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit ConfigureDebug(Core::System& system_, QWidget* parent = nullptr);
|
||||
explicit ConfigureDebug(const Core::System& system_, QWidget* parent = nullptr);
|
||||
~ConfigureDebug() override;
|
||||
|
||||
void ApplyConfiguration();
|
||||
|
@ -32,5 +32,5 @@ private:
|
|||
|
||||
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_tab.h"
|
||||
|
||||
ConfigureDebugTab::ConfigureDebugTab(Core::System& system_, QWidget* parent)
|
||||
ConfigureDebugTab::ConfigureDebugTab(const Core::System& system_, QWidget* parent)
|
||||
: QWidget(parent),
|
||||
ui(new Ui::ConfigureDebugTab), system{system_}, debug_tab{std::make_unique<ConfigureDebug>(
|
||||
system_, this)},
|
||||
ui(new Ui::ConfigureDebugTab), debug_tab{std::make_unique<ConfigureDebug>(system_, this)},
|
||||
cpu_debug_tab{std::make_unique<ConfigureCpuDebug>(system_, this)} {
|
||||
ui->setupUi(this);
|
||||
|
||||
|
|
|
@ -22,7 +22,7 @@ class ConfigureDebugTab : public QWidget {
|
|||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit ConfigureDebugTab(Core::System& system_, QWidget* parent = nullptr);
|
||||
explicit ConfigureDebugTab(const Core::System& system_, QWidget* parent = nullptr);
|
||||
~ConfigureDebugTab() override;
|
||||
|
||||
void ApplyConfiguration();
|
||||
|
@ -37,8 +37,6 @@ private:
|
|||
|
||||
std::unique_ptr<Ui::ConfigureDebugTab> ui;
|
||||
|
||||
Core::System& system;
|
||||
|
||||
std::unique_ptr<ConfigureDebug> debug_tab;
|
||||
std::unique_ptr<ConfigureCpuDebug> cpu_debug_tab;
|
||||
};
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
#include "yuzu/configuration/configure_general.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_} {
|
||||
ui->setupUi(this);
|
||||
|
||||
|
|
|
@ -28,7 +28,7 @@ class ConfigureGeneral : public QWidget {
|
|||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit ConfigureGeneral(Core::System& system_, QWidget* parent = nullptr);
|
||||
explicit ConfigureGeneral(const Core::System& system_, QWidget* parent = nullptr);
|
||||
~ConfigureGeneral() override;
|
||||
|
||||
void SetResetCallback(std::function<void()> callback);
|
||||
|
@ -49,5 +49,5 @@ private:
|
|||
ConfigurationShared::CheckState use_speed_limit;
|
||||
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/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_} {
|
||||
vulkan_device = Settings::values.vulkan_device.GetValue();
|
||||
RetrieveVulkanDevices();
|
||||
|
|
|
@ -26,7 +26,7 @@ class ConfigureGraphics : public QWidget {
|
|||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit ConfigureGraphics(Core::System& system_, QWidget* parent = nullptr);
|
||||
explicit ConfigureGraphics(const Core::System& system_, QWidget* parent = nullptr);
|
||||
~ConfigureGraphics() override;
|
||||
|
||||
void ApplyConfiguration();
|
||||
|
@ -60,5 +60,5 @@ private:
|
|||
u32 vulkan_device{};
|
||||
Settings::ShaderBackend shader_backend{};
|
||||
|
||||
Core::System& system;
|
||||
const Core::System& system;
|
||||
};
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
#include "yuzu/configuration/configuration_shared.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_} {
|
||||
|
||||
ui->setupUi(this);
|
||||
|
|
|
@ -23,7 +23,7 @@ class ConfigureGraphicsAdvanced : public QWidget {
|
|||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit ConfigureGraphicsAdvanced(Core::System& system_, QWidget* parent = nullptr);
|
||||
explicit ConfigureGraphicsAdvanced(const Core::System& system_, QWidget* parent = nullptr);
|
||||
~ConfigureGraphicsAdvanced() override;
|
||||
|
||||
void ApplyConfiguration();
|
||||
|
@ -41,5 +41,5 @@ private:
|
|||
ConfigurationShared::CheckState use_asynchronous_shaders;
|
||||
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
|
||||
|
||||
ConfigureProfileManager::ConfigureProfileManager(Core::System& system_, QWidget* parent)
|
||||
ConfigureProfileManager::ConfigureProfileManager(const Core::System& system_, QWidget* parent)
|
||||
: QWidget(parent), ui(new Ui::ConfigureProfileManager),
|
||||
profile_manager(std::make_unique<Service::Account::ProfileManager>()), system{system_} {
|
||||
ui->setupUi(this);
|
||||
|
|
|
@ -31,7 +31,7 @@ class ConfigureProfileManager : public QWidget {
|
|||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit ConfigureProfileManager(Core::System& system_, QWidget* parent = nullptr);
|
||||
explicit ConfigureProfileManager(const Core::System& system_, QWidget* parent = nullptr);
|
||||
~ConfigureProfileManager() override;
|
||||
|
||||
void ApplyConfiguration();
|
||||
|
@ -63,5 +63,5 @@ private:
|
|||
|
||||
std::unique_ptr<Service::Account::ProfileManager> profile_manager;
|
||||
|
||||
Core::System& system;
|
||||
const Core::System& system;
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue