mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-12-18 14:38:04 -06:00
Rename literal operator
Qt 6.4 introduced `QString operator""_s()` and the previous `""_qs` is deprecated since Qt 6.8.
This commit is contained in:
@@ -47,13 +47,13 @@ void AuthController::loginAction()
|
||||
{
|
||||
if (m_sessionManager->session())
|
||||
{
|
||||
setResult(u"Ok."_qs);
|
||||
setResult(u"Ok."_s);
|
||||
return;
|
||||
}
|
||||
|
||||
const QString clientAddr {m_sessionManager->clientId()};
|
||||
const QString usernameFromWeb {params()[u"username"_qs]};
|
||||
const QString passwordFromWeb {params()[u"password"_qs]};
|
||||
const QString usernameFromWeb {params()[u"username"_s]};
|
||||
const QString passwordFromWeb {params()[u"password"_s]};
|
||||
|
||||
if (isBanned())
|
||||
{
|
||||
@@ -76,14 +76,14 @@ void AuthController::loginAction()
|
||||
m_clientFailedLogins.remove(clientAddr);
|
||||
|
||||
m_sessionManager->sessionStart();
|
||||
setResult(u"Ok."_qs);
|
||||
setResult(u"Ok."_s);
|
||||
LogMsg(tr("WebAPI login success. IP: %1").arg(clientAddr));
|
||||
}
|
||||
else
|
||||
{
|
||||
if (Preferences::instance()->getWebUIMaxAuthFailCount() > 0)
|
||||
increaseFailedAttempts();
|
||||
setResult(u"Fails."_qs);
|
||||
setResult(u"Fails."_s);
|
||||
LogMsg(tr("WebAPI login failure. Reason: invalid credentials, attempt count: %1, IP: %2, username: %3")
|
||||
.arg(QString::number(failedAttemptsCount()), clientAddr, usernameFromWeb)
|
||||
, Log::WARNING);
|
||||
|
||||
Reference in New Issue
Block a user