mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-21 05:09:34 -06:00
DolphinQt2: replace Settings with SConfig where possible
Changes: - `ShowDevelopmentWarning` is now under the '[Interface]' group in Dolphin.ini, with other interface-related settings. So, whoever uses DolphinQt will have to edit that manually again. Sorry! - Game search paths and the last file are now shared properly with DolphinWX - Qt-only preferences like "Preferred View: list/table" are now stored using the platform's native settings storage, rather than in UI.ini
This commit is contained in:
@ -10,6 +10,8 @@
|
||||
#include <QPushButton>
|
||||
#include <QVBoxLayout>
|
||||
|
||||
#include "Core/ConfigManager.h"
|
||||
|
||||
#include "DolphinQt2/Settings.h"
|
||||
#include "DolphinQt2/Settings/PathPane.h"
|
||||
|
||||
@ -41,7 +43,7 @@ void PathPane::BrowseDefaultGame()
|
||||
if (!file.isEmpty())
|
||||
{
|
||||
m_game_edit->setText(file);
|
||||
Settings::Instance().SetDefaultGame(file);
|
||||
SConfig::GetInstance().m_strDefaultISO = file.toStdString();
|
||||
}
|
||||
}
|
||||
|
||||
@ -51,7 +53,7 @@ void PathPane::BrowseDVDRoot()
|
||||
if (!dir.isEmpty())
|
||||
{
|
||||
m_dvd_edit->setText(dir);
|
||||
Settings::Instance().SetDVDRoot(dir);
|
||||
SConfig::GetInstance().m_strDVDRoot = dir.toStdString();
|
||||
}
|
||||
}
|
||||
|
||||
@ -62,7 +64,7 @@ void PathPane::BrowseApploader()
|
||||
if (!file.isEmpty())
|
||||
{
|
||||
m_app_edit->setText(file);
|
||||
Settings::Instance().SetApploader(file);
|
||||
SConfig::GetInstance().m_strApploader = file.toStdString();
|
||||
}
|
||||
}
|
||||
|
||||
@ -73,7 +75,7 @@ void PathPane::BrowseWiiNAND()
|
||||
if (!dir.isEmpty())
|
||||
{
|
||||
m_nand_edit->setText(dir);
|
||||
Settings::Instance().SetWiiNAND(dir);
|
||||
SConfig::GetInstance().m_NANDPath = dir.toStdString();
|
||||
}
|
||||
}
|
||||
|
||||
@ -113,40 +115,39 @@ QGroupBox* PathPane::MakeGameFolderBox()
|
||||
|
||||
QGridLayout* PathPane::MakePathsLayout()
|
||||
{
|
||||
auto& settings = Settings::Instance();
|
||||
QGridLayout* layout = new QGridLayout;
|
||||
layout->setColumnStretch(1, 1);
|
||||
|
||||
m_game_edit = new QLineEdit(settings.GetDefaultGame());
|
||||
m_game_edit = new QLineEdit(QString::fromStdString(SConfig::GetInstance().m_strDefaultISO));
|
||||
connect(m_game_edit, &QLineEdit::editingFinished,
|
||||
[=, &settings] { settings.SetDefaultGame(m_game_edit->text()); });
|
||||
[=] { SConfig::GetInstance().m_strDefaultISO = m_game_edit->text().toStdString(); });
|
||||
QPushButton* game_open = new QPushButton;
|
||||
connect(game_open, &QPushButton::clicked, this, &PathPane::BrowseDefaultGame);
|
||||
layout->addWidget(new QLabel(tr("Default Game")), 0, 0);
|
||||
layout->addWidget(m_game_edit, 0, 1);
|
||||
layout->addWidget(game_open, 0, 2);
|
||||
|
||||
m_dvd_edit = new QLineEdit(settings.GetDVDRoot());
|
||||
m_dvd_edit = new QLineEdit(QString::fromStdString(SConfig::GetInstance().m_strDVDRoot));
|
||||
connect(m_dvd_edit, &QLineEdit::editingFinished,
|
||||
[=, &settings] { settings.SetDVDRoot(m_dvd_edit->text()); });
|
||||
[=] { SConfig::GetInstance().m_strDVDRoot = m_dvd_edit->text().toStdString(); });
|
||||
QPushButton* dvd_open = new QPushButton;
|
||||
connect(dvd_open, &QPushButton::clicked, this, &PathPane::BrowseDVDRoot);
|
||||
layout->addWidget(new QLabel(tr("DVD Root")), 1, 0);
|
||||
layout->addWidget(m_dvd_edit, 1, 1);
|
||||
layout->addWidget(dvd_open, 1, 2);
|
||||
|
||||
m_app_edit = new QLineEdit(settings.GetApploader());
|
||||
m_app_edit = new QLineEdit(QString::fromStdString(SConfig::GetInstance().m_strApploader));
|
||||
connect(m_app_edit, &QLineEdit::editingFinished,
|
||||
[=, &settings] { settings.SetApploader(m_app_edit->text()); });
|
||||
[=] { SConfig::GetInstance().m_strApploader = m_app_edit->text().toStdString(); });
|
||||
QPushButton* app_open = new QPushButton;
|
||||
connect(app_open, &QPushButton::clicked, this, &PathPane::BrowseApploader);
|
||||
layout->addWidget(new QLabel(tr("Apploader")), 2, 0);
|
||||
layout->addWidget(m_app_edit, 2, 1);
|
||||
layout->addWidget(app_open, 2, 2);
|
||||
|
||||
m_nand_edit = new QLineEdit(settings.GetWiiNAND());
|
||||
m_nand_edit = new QLineEdit(QString::fromStdString(SConfig::GetInstance().m_NANDPath));
|
||||
connect(m_nand_edit, &QLineEdit::editingFinished,
|
||||
[=, &settings] { settings.SetWiiNAND(m_nand_edit->text()); });
|
||||
[=] { SConfig::GetInstance().m_NANDPath = m_nand_edit->text().toStdString(); });
|
||||
QPushButton* nand_open = new QPushButton;
|
||||
connect(nand_open, &QPushButton::clicked, this, &PathPane::BrowseWiiNAND);
|
||||
layout->addWidget(new QLabel(tr("Wii NAND Root")), 3, 0);
|
||||
|
Reference in New Issue
Block a user