1
Fork 0
mirror of https://github.com/redstrate/Astra.git synced 2025-05-17 14:47:45 +00:00

Remove broken steam username regex

This commit is contained in:
Joshua Goins 2025-05-04 16:43:20 -04:00
parent 8bf51eb169
commit 8ba54b2332

View file

@ -255,22 +255,9 @@ QCoro::Task<std::optional<SquareEnixLogin::StoredInfo>> SquareEnixLogin::getStor
const auto reply = m_launcher.mgr()->get(request);
co_await reply;
const QString str = QString::fromUtf8(reply->readAll());
// fetches Steam username
if (m_info->profile->account()->config()->license() == Account::GameLicense::WindowsSteam) {
const static QRegularExpression re(QStringLiteral(R"lit(<input name=""sqexid"" type=""hidden"" value=""(?<sqexid>.*)""\/>)lit"));
const QRegularExpressionMatch match = re.match(str);
if (match.hasMatch()) {
m_username = match.captured(1);
} else {
Q_EMIT m_launcher.loginError(i18n("Could not get Steam username, have you attached your account?"));
}
} else {
m_username = m_info->username;
}
const QString str = QString::fromUtf8(reply->readAll());
const static QRegularExpression re(QStringLiteral(R"lit(\t<\s*input .* name="_STORED_" value="(?<stored>.*)">)lit"));
const QRegularExpressionMatch match = re.match(str);
if (match.hasMatch()) {