1
Fork 0
mirror of https://github.com/redstrate/Astra.git synced 2025-04-23 12:57:45 +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; [[nodiscard]] QString accountUuid() const;
void setAccount(Account *account); void setAccount(Account *account);
void readGameData(); void readGameVersion();
Q_INVOKABLE void readGameVersion();
void readWineInfo();
void readDalamudInfo();
[[nodiscard]] QString expansionVersionText() const; [[nodiscard]] QString expansionVersionText() const;
[[nodiscard]] QString dalamudVersionText() const; [[nodiscard]] QString dalamudVersionText() const;
@ -177,6 +174,10 @@ Q_SIGNALS:
void loggedInChanged(); void loggedInChanged();
private: private:
void readGameData();
void readWineInfo();
void readDalamudInfo();
QString m_uuid; QString m_uuid;
QString m_wineVersion; QString m_wineVersion;
ProfileConfig *m_config = nullptr; ProfileConfig *m_config = nullptr;

View file

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

View file

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

View file

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

View file

@ -44,10 +44,6 @@ Profile *ProfileManager::addProfile()
auto newProfile = new Profile(m_launcher, QUuid::createUuid().toString(), this); auto newProfile = new Profile(m_launcher, QUuid::createUuid().toString(), this);
newProfile->setName(QStringLiteral("New Profile")); newProfile->setName(QStringLiteral("New Profile"));
newProfile->readWineInfo();
newProfile->setWinePrefixPath(getDefaultWinePrefixPath());
insertProfile(newProfile); insertProfile(newProfile);
return newProfile; return newProfile;
@ -65,19 +61,6 @@ void ProfileManager::deleteProfile(Profile *profile)
endRemoveRows(); 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) QString ProfileManager::getDefaultGamePath(const QString &uuid)
{ {
#if defined(Q_OS_WIN) #if defined(Q_OS_WIN)

View file

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

View file

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