mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-29 04:08:55 +00:00
DolphinQt2: make Settings a singleton
With this, we can get signals when properties change.
This commit is contained in:
parent
95ef785b1f
commit
548522877a
15 changed files with 109 additions and 89 deletions
|
@ -17,10 +17,16 @@ static QString GetSettingsPath()
|
|||
return QString::fromStdString(File::GetUserPath(D_CONFIG_IDX)) + QStringLiteral("/UI.ini");
|
||||
}
|
||||
|
||||
Settings::Settings(QObject* parent) : QSettings(GetSettingsPath(), QSettings::IniFormat, parent)
|
||||
Settings::Settings() : QSettings(GetSettingsPath(), QSettings::IniFormat)
|
||||
{
|
||||
}
|
||||
|
||||
Settings& Settings::Instance()
|
||||
{
|
||||
static Settings settings;
|
||||
return settings;
|
||||
}
|
||||
|
||||
QString Settings::GetThemeDir() const
|
||||
{
|
||||
return QString::fromStdString(File::GetThemeDir(SConfig::GetInstance().theme_name));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue