1
Fork 0
mirror of https://github.com/redstrate/Astra.git synced 2025-04-21 12:17:45 +00:00

Save account and profile config changes again

This commit is contained in:
Joshua Goins 2025-03-17 18:47:32 -04:00
parent 79bd032322
commit a6c4f53862
4 changed files with 14 additions and 2 deletions

View file

@ -20,6 +20,7 @@ class Account : public QObject
public:
explicit Account(const QString &key, QObject *parent = nullptr);
~Account() override;
enum GameLicense {
WindowsStandalone,

View file

@ -29,6 +29,7 @@ class Profile : public QObject
public:
explicit Profile(const QString &key, QObject *parent = nullptr);
~Profile() override;
enum WineType {
BuiltIn,

View file

@ -15,12 +15,17 @@ using namespace Qt::StringLiterals;
Account::Account(const QString &key, QObject *parent)
: QObject(parent)
, m_config(new AccountConfig(key))
, m_config(new AccountConfig(key, this))
, m_key(key)
{
fetchPassword();
}
Account::~Account()
{
m_config->save();
}
QString Account::uuid() const
{
return m_key;

View file

@ -19,7 +19,7 @@ using namespace Qt::StringLiterals;
Profile::Profile(const QString &key, QObject *parent)
: QObject(parent)
, m_uuid(key)
, m_config(new ProfileConfig(key))
, m_config(new ProfileConfig(key, this))
{
readGameVersion();
readWineInfo();
@ -30,6 +30,11 @@ Profile::Profile(const QString &key, QObject *parent)
connect(m_config, &ProfileConfig::GamePathChanged, this, &Profile::hasDirectx9Changed);
}
Profile::~Profile()
{
m_config->save();
}
void Profile::readDalamudInfo()
{
const QDir dataDir = QStandardPaths::writableLocation(QStandardPaths::AppDataLocation);