mirror of
https://github.com/redstrate/Astra.git
synced 2025-04-20 11:47:46 +00:00
Save account and profile config changes again
This commit is contained in:
parent
79bd032322
commit
a6c4f53862
4 changed files with 14 additions and 2 deletions
|
@ -20,6 +20,7 @@ class Account : public QObject
|
||||||
|
|
||||||
public:
|
public:
|
||||||
explicit Account(const QString &key, QObject *parent = nullptr);
|
explicit Account(const QString &key, QObject *parent = nullptr);
|
||||||
|
~Account() override;
|
||||||
|
|
||||||
enum GameLicense {
|
enum GameLicense {
|
||||||
WindowsStandalone,
|
WindowsStandalone,
|
||||||
|
|
|
@ -29,6 +29,7 @@ class Profile : public QObject
|
||||||
|
|
||||||
public:
|
public:
|
||||||
explicit Profile(const QString &key, QObject *parent = nullptr);
|
explicit Profile(const QString &key, QObject *parent = nullptr);
|
||||||
|
~Profile() override;
|
||||||
|
|
||||||
enum WineType {
|
enum WineType {
|
||||||
BuiltIn,
|
BuiltIn,
|
||||||
|
|
|
@ -15,12 +15,17 @@ using namespace Qt::StringLiterals;
|
||||||
|
|
||||||
Account::Account(const QString &key, QObject *parent)
|
Account::Account(const QString &key, QObject *parent)
|
||||||
: QObject(parent)
|
: QObject(parent)
|
||||||
, m_config(new AccountConfig(key))
|
, m_config(new AccountConfig(key, this))
|
||||||
, m_key(key)
|
, m_key(key)
|
||||||
{
|
{
|
||||||
fetchPassword();
|
fetchPassword();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Account::~Account()
|
||||||
|
{
|
||||||
|
m_config->save();
|
||||||
|
}
|
||||||
|
|
||||||
QString Account::uuid() const
|
QString Account::uuid() const
|
||||||
{
|
{
|
||||||
return m_key;
|
return m_key;
|
||||||
|
|
|
@ -19,7 +19,7 @@ using namespace Qt::StringLiterals;
|
||||||
Profile::Profile(const QString &key, QObject *parent)
|
Profile::Profile(const QString &key, QObject *parent)
|
||||||
: QObject(parent)
|
: QObject(parent)
|
||||||
, m_uuid(key)
|
, m_uuid(key)
|
||||||
, m_config(new ProfileConfig(key))
|
, m_config(new ProfileConfig(key, this))
|
||||||
{
|
{
|
||||||
readGameVersion();
|
readGameVersion();
|
||||||
readWineInfo();
|
readWineInfo();
|
||||||
|
@ -30,6 +30,11 @@ Profile::Profile(const QString &key, QObject *parent)
|
||||||
connect(m_config, &ProfileConfig::GamePathChanged, this, &Profile::hasDirectx9Changed);
|
connect(m_config, &ProfileConfig::GamePathChanged, this, &Profile::hasDirectx9Changed);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Profile::~Profile()
|
||||||
|
{
|
||||||
|
m_config->save();
|
||||||
|
}
|
||||||
|
|
||||||
void Profile::readDalamudInfo()
|
void Profile::readDalamudInfo()
|
||||||
{
|
{
|
||||||
const QDir dataDir = QStandardPaths::writableLocation(QStandardPaths::AppDataLocation);
|
const QDir dataDir = QStandardPaths::writableLocation(QStandardPaths::AppDataLocation);
|
||||||
|
|
Loading…
Add table
Reference in a new issue