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:
parent
b17dcaf0b2
commit
3a7dc40826
7 changed files with 8 additions and 25 deletions
|
@ -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;
|
||||||
|
|
|
@ -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;
|
||||||
|
|
|
@ -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;
|
||||||
});
|
});
|
||||||
|
|
|
@ -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();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -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)
|
||||||
|
|
|
@ -37,7 +37,6 @@ Kirigami.Page {
|
||||||
target: gameInstaller
|
target: gameInstaller
|
||||||
|
|
||||||
function onInstallFinished() {
|
function onInstallFinished() {
|
||||||
LauncherCore.currentProfile.readGameVersion();
|
|
||||||
applicationWindow().checkSetup();
|
applicationWindow().checkSetup();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -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();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue