mirror of
https://github.com/redstrate/Astra.git
synced 2025-04-23 12:57:45 +00:00
Remove LauncherCore::launchGame
This is only used internally now, so we can remove it from public API
This commit is contained in:
parent
7ad09f6fcf
commit
ca4d47349b
3 changed files with 8 additions and 18 deletions
|
@ -95,11 +95,6 @@ public:
|
||||||
*/
|
*/
|
||||||
Q_INVOKABLE bool autoLogin(Profile *profile);
|
Q_INVOKABLE bool autoLogin(Profile *profile);
|
||||||
|
|
||||||
/*
|
|
||||||
* Launches the game using the provided authentication.
|
|
||||||
*/
|
|
||||||
void launchGame(Profile &settings, const LoginAuth &auth);
|
|
||||||
|
|
||||||
void buildRequest(const Profile &settings, QNetworkRequest &request);
|
void buildRequest(const Profile &settings, QNetworkRequest &request);
|
||||||
void setSSL(QNetworkRequest &request);
|
void setSSL(QNetworkRequest &request);
|
||||||
void setupIgnoreSSL(QNetworkReply *reply);
|
void setupIgnoreSSL(QNetworkReply *reply);
|
||||||
|
|
|
@ -57,17 +57,6 @@ void LauncherCore::buildRequest(const Profile &settings, QNetworkRequest &reques
|
||||||
request.setRawHeader(QByteArrayLiteral("Accept-Language"), QByteArrayLiteral("en-us"));
|
request.setRawHeader(QByteArrayLiteral("Accept-Language"), QByteArrayLiteral("en-us"));
|
||||||
}
|
}
|
||||||
|
|
||||||
void LauncherCore::launchGame(Profile &profile, const LoginAuth &auth)
|
|
||||||
{
|
|
||||||
Q_EMIT stageChanged(i18n("Launching game..."));
|
|
||||||
|
|
||||||
if (isSteam()) {
|
|
||||||
m_steamApi->setLauncherMode(false);
|
|
||||||
}
|
|
||||||
|
|
||||||
m_runner->beginGameExecutable(profile, auth);
|
|
||||||
}
|
|
||||||
|
|
||||||
QCoro::Task<> LauncherCore::beginLogin(LoginInformation &info)
|
QCoro::Task<> LauncherCore::beginLogin(LoginInformation &info)
|
||||||
{
|
{
|
||||||
info.profile->account()->updateConfig();
|
info.profile->account()->updateConfig();
|
||||||
|
@ -82,7 +71,13 @@ QCoro::Task<> LauncherCore::beginLogin(LoginInformation &info)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (auth != std::nullopt) {
|
if (auth != std::nullopt) {
|
||||||
launchGame(*info.profile, *auth);
|
Q_EMIT stageChanged(i18n("Launching game..."));
|
||||||
|
|
||||||
|
if (isSteam()) {
|
||||||
|
m_steamApi->setLauncherMode(false);
|
||||||
|
}
|
||||||
|
|
||||||
|
m_runner->beginGameExecutable(*info.profile, *auth);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -69,6 +69,6 @@ void SapphireLogin::registerAccount(const QString &lobbyUrl, const LoginInformat
|
||||||
auth.frontierHost = document[QLatin1String("frontierHost")].toString();
|
auth.frontierHost = document[QLatin1String("frontierHost")].toString();
|
||||||
auth.region = 3;
|
auth.region = 3;
|
||||||
|
|
||||||
m_launcher.launchGame(*info.profile, auth);
|
// m_launcher.launchGame(*info.profile, auth);
|
||||||
});
|
});
|
||||||
}
|
}
|
Loading…
Add table
Reference in a new issue