mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2024-11-28 21:38:51 +03:00
Always use multi-arg arg() overload when possible
Fixed clazy-qstring-arg Clazy warnings
This commit is contained in:
parent
bfef403411
commit
776c1f1546
1 changed files with 3 additions and 4 deletions
|
@ -160,7 +160,7 @@ namespace
|
||||||
return Utils::String::unquote(parts[1], QLatin1String("'\""));
|
return Utils::String::unquote(parts[1], QLatin1String("'\""));
|
||||||
throw CommandLineParameterError(QObject::tr("Parameter '%1' must follow syntax '%1=%2'",
|
throw CommandLineParameterError(QObject::tr("Parameter '%1' must follow syntax '%1=%2'",
|
||||||
"e.g. Parameter '--webui-port' must follow syntax '--webui-port=value'")
|
"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
|
QString value(const QProcessEnvironment &env, const QString &defaultValue = {}) const
|
||||||
|
@ -206,7 +206,7 @@ namespace
|
||||||
if (!ok)
|
if (!ok)
|
||||||
throw CommandLineParameterError(QObject::tr("Parameter '%1' must follow syntax '%1=%2'",
|
throw CommandLineParameterError(QObject::tr("Parameter '%1' must follow syntax '%1=%2'",
|
||||||
"e.g. Parameter '--webui-port' must follow syntax '--webui-port=<value>'")
|
"e.g. Parameter '--webui-port' must follow syntax '--webui-port=<value>'")
|
||||||
.arg(fullParameter()).arg(QLatin1String("<integer value>")));
|
.arg(fullParameter(), QLatin1String("<integer value>")));
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -274,8 +274,7 @@ namespace
|
||||||
throw CommandLineParameterError(QObject::tr("Parameter '%1' must follow syntax '%1=%2'",
|
throw CommandLineParameterError(QObject::tr("Parameter '%1' must follow syntax '%1=%2'",
|
||||||
"e.g. Parameter '--add-paused' must follow syntax "
|
"e.g. Parameter '--add-paused' must follow syntax "
|
||||||
"'--add-paused=<true|false>'")
|
"'--add-paused=<true|false>'")
|
||||||
.arg(fullParameter())
|
.arg(fullParameter(), QLatin1String("<true|false>")));
|
||||||
.arg(QLatin1String("<true|false>")));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
TriStateBool value(const QProcessEnvironment &env) const
|
TriStateBool value(const QProcessEnvironment &env) const
|
||||||
|
|
Loading…
Reference in a new issue