1
Fork 0
mirror of https://github.com/redstrate/Astra.git synced 2025-04-23 04:57:44 +00:00

Remove more dead code

This commit is contained in:
Joshua Goins 2023-10-08 19:14:17 -04:00
parent b17dcaf0b2
commit 3a7dc40826
7 changed files with 8 additions and 25 deletions

View file

@ -119,10 +119,7 @@ public:
[[nodiscard]] QString accountUuid() const;
void setAccount(Account *account);
void readGameData();
Q_INVOKABLE void readGameVersion();
void readWineInfo();
void readDalamudInfo();
void readGameVersion();
[[nodiscard]] QString expansionVersionText() const;
[[nodiscard]] QString dalamudVersionText() const;
@ -177,6 +174,10 @@ Q_SIGNALS:
void loggedInChanged();
private:
void readGameData();
void readWineInfo();
void readDalamudInfo();
QString m_uuid;
QString m_wineVersion;
ProfileConfig *m_config = nullptr;

View file

@ -46,8 +46,6 @@ public:
private:
void insertProfile(Profile *profile);
QString getDefaultWinePrefixPath();
QVector<Profile *> m_profiles;
LauncherCore &m_launcher;

View file

@ -58,6 +58,8 @@ void GameInstaller::installGame()
physis_install_game(fileNameStd.c_str(), installDirectoryStd.c_str());
m_profile.readGameVersion();
Q_EMIT installFinished();
qInfo(ASTRA_LOG) << "Installed game in" << installDirectory;
});

View file

@ -126,6 +126,7 @@ void Profile::setGamePath(const QString &path)
if (m_config->gamePath() != path) {
m_config->setGamePath(path);
m_config->save();
readGameVersion();
Q_EMIT gamePathChanged();
}
}

View file

@ -44,10 +44,6 @@ Profile *ProfileManager::addProfile()
auto newProfile = new Profile(m_launcher, QUuid::createUuid().toString(), this);
newProfile->setName(QStringLiteral("New Profile"));
newProfile->readWineInfo();
newProfile->setWinePrefixPath(getDefaultWinePrefixPath());
insertProfile(newProfile);
return newProfile;
@ -65,19 +61,6 @@ void ProfileManager::deleteProfile(Profile *profile)
endRemoveRows();
}
QString ProfileManager::getDefaultWinePrefixPath()
{
#if defined(Q_OS_MACOS)
return QDir::homePath() + "/Library/Application Support/FINAL FANTASY XIV ONLINE/Bottles/published_Final_Fantasy";
#endif
#if defined(Q_OS_LINUX)
return QDir::homePath() + QStringLiteral("/.wine");
#endif
Q_UNREACHABLE();
}
QString ProfileManager::getDefaultGamePath(const QString &uuid)
{
#if defined(Q_OS_WIN)

View file

@ -37,7 +37,6 @@ Kirigami.Page {
target: gameInstaller
function onInstallFinished() {
LauncherCore.currentProfile.readGameVersion();
applicationWindow().checkSetup();
}

View file

@ -64,7 +64,6 @@ Kirigami.Page {
onClicked: {
LauncherCore.currentProfile.gamePath = profile.gamePath;
LauncherCore.currentProfile.readGameVersion();
applicationWindow().checkSetup();
}
}