1
0
mirror of https://github.com/d47081/qBittorrent.git synced 2025-01-22 12:34:19 +00:00

Merge pull request #13439 from FranciscoPombal/clazy_fixes_2

Clazy fixes
This commit is contained in:
Vladimir Golovnev 2020-10-09 07:10:25 +03:00 committed by GitHub
commit cf93fe124d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 5 deletions

View File

@ -160,7 +160,7 @@ namespace
return Utils::String::unquote(parts[1], QLatin1String("'\""));
throw CommandLineParameterError(QObject::tr("Parameter '%1' must follow syntax '%1=%2'",
"e.g. Parameter '--webui-port' must follow syntax '--webui-port=value'")
.arg(fullParameter()).arg(QLatin1String("<value>")));
.arg(fullParameter(), QLatin1String("<value>")));
}
QString value(const QProcessEnvironment &env, const QString &defaultValue = {}) const
@ -206,7 +206,7 @@ namespace
if (!ok)
throw CommandLineParameterError(QObject::tr("Parameter '%1' must follow syntax '%1=%2'",
"e.g. Parameter '--webui-port' must follow syntax '--webui-port=<value>'")
.arg(fullParameter()).arg(QLatin1String("<integer value>")));
.arg(fullParameter(), QLatin1String("<integer value>")));
return res;
}
@ -274,8 +274,7 @@ namespace
throw CommandLineParameterError(QObject::tr("Parameter '%1' must follow syntax '%1=%2'",
"e.g. Parameter '--add-paused' must follow syntax "
"'--add-paused=<true|false>'")
.arg(fullParameter())
.arg(QLatin1String("<true|false>")));
.arg(fullParameter(), QLatin1String("<true|false>")));
}
TriStateBool value(const QProcessEnvironment &env) const

View File

@ -238,7 +238,7 @@ Http::Response Tracker::processRequest(const Http::Request &request, const Http:
if (request.method != Http::HEADER_REQUEST_METHOD_GET)
throw MethodNotAllowedHTTPError();
if (request.path.toLower().startsWith(ANNOUNCE_REQUEST_PATH))
if (request.path.startsWith(ANNOUNCE_REQUEST_PATH, Qt::CaseInsensitive))
processAnnounceRequest();
else
throw NotFoundHTTPError();