mirror of
https://github.com/RPCSX/rpcsx.git
synced 2026-04-09 00:14:56 +00:00
Qt: do not use localized filenames for default current config and default stylesheet
This commit is contained in:
parent
c13d345604
commit
1bbc60c3e7
13 changed files with 54 additions and 46 deletions
|
|
@ -12,10 +12,8 @@ inline std::string sstr(const QString& _in) { return _in.toStdString(); }
|
|||
|
||||
gui_settings::gui_settings(QObject* parent) : settings(parent)
|
||||
{
|
||||
const Localized localized;
|
||||
|
||||
m_current_name = localized.constants.Settings;
|
||||
m_settings = new QSettings(ComputeSettingsDir() + localized.constants.Settings + ".ini", QSettings::Format::IniFormat, parent);
|
||||
m_current_name = gui::Settings;
|
||||
m_settings = new QSettings(ComputeSettingsDir() + gui::Settings + ".ini", QSettings::Format::IniFormat, parent);
|
||||
|
||||
const QString settings_name = GetValue(gui::m_currentConfig).toString();
|
||||
|
||||
|
|
@ -49,17 +47,15 @@ bool gui_settings::ChangeToConfig(const QString& friendly_name)
|
|||
return false;
|
||||
}
|
||||
|
||||
const Localized localized;
|
||||
|
||||
if (friendly_name != localized.constants.Settings)
|
||||
if (friendly_name != gui::Settings)
|
||||
{
|
||||
if (m_current_name == localized.constants.Settings)
|
||||
if (m_current_name == gui::Settings)
|
||||
{
|
||||
SetValue(gui::m_currentConfig, friendly_name);
|
||||
}
|
||||
else
|
||||
{
|
||||
QSettings tmp(m_settings_dir.absoluteFilePath(localized.constants.Settings + ".ini"), QSettings::Format::IniFormat, parent());
|
||||
QSettings tmp(m_settings_dir.absoluteFilePath(gui::Settings + ".ini"), QSettings::Format::IniFormat, parent());
|
||||
tmp.beginGroup(gui::m_currentConfig.key);
|
||||
tmp.setValue(gui::m_currentConfig.name, friendly_name);
|
||||
tmp.endGroup();
|
||||
|
|
@ -243,18 +239,16 @@ void gui_settings::SetCustomColor(int col, const QColor& val)
|
|||
|
||||
void gui_settings::SaveCurrentConfig(const QString& friendly_name)
|
||||
{
|
||||
const Localized localized;
|
||||
|
||||
if (friendly_name != localized.constants.Settings)
|
||||
if (friendly_name != gui::Settings)
|
||||
{
|
||||
if (m_current_name == localized.constants.Settings)
|
||||
if (m_current_name == gui::Settings)
|
||||
{
|
||||
SetValue(gui::m_currentConfig, friendly_name);
|
||||
m_settings->sync();
|
||||
}
|
||||
else
|
||||
{
|
||||
QSettings tmp(m_settings_dir.absoluteFilePath(localized.constants.Settings + ".ini"), QSettings::Format::IniFormat, parent());
|
||||
QSettings tmp(m_settings_dir.absoluteFilePath(gui::Settings + ".ini"), QSettings::Format::IniFormat, parent());
|
||||
tmp.beginGroup(gui::m_currentConfig.key);
|
||||
tmp.setValue(gui::m_currentConfig.name, friendly_name);
|
||||
tmp.endGroup();
|
||||
|
|
@ -333,11 +327,11 @@ QString gui_settings::GetCurrentStylesheetPath()
|
|||
|
||||
QString stylesheet = GetValue(gui::m_currentStylesheet).toString();
|
||||
|
||||
if (stylesheet == localized.constants.Default)
|
||||
if (stylesheet == gui::Default)
|
||||
{
|
||||
return "";
|
||||
}
|
||||
else if (stylesheet == localized.constants.None)
|
||||
else if (stylesheet == gui::None)
|
||||
{
|
||||
return "-";
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue