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:
parent
b17dcaf0b2
commit
3a7dc40826
7 changed files with 8 additions and 25 deletions
|
@ -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;
|
||||
|
|
|
@ -46,8 +46,6 @@ public:
|
|||
private:
|
||||
void insertProfile(Profile *profile);
|
||||
|
||||
QString getDefaultWinePrefixPath();
|
||||
|
||||
QVector<Profile *> m_profiles;
|
||||
|
||||
LauncherCore &m_launcher;
|
||||
|
|
|
@ -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;
|
||||
});
|
||||
|
|
|
@ -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();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -37,7 +37,6 @@ Kirigami.Page {
|
|||
target: gameInstaller
|
||||
|
||||
function onInstallFinished() {
|
||||
LauncherCore.currentProfile.readGameVersion();
|
||||
applicationWindow().checkSetup();
|
||||
}
|
||||
|
||||
|
|
|
@ -64,7 +64,6 @@ Kirigami.Page {
|
|||
|
||||
onClicked: {
|
||||
LauncherCore.currentProfile.gamePath = profile.gamePath;
|
||||
LauncherCore.currentProfile.readGameVersion();
|
||||
applicationWindow().checkSetup();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue