mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-07-08 06:00:59 -07:00
Accept "share limits" when adding torrent using WebAPI
This commit is contained in:
parent
0bf36ad031
commit
e2c785b2d5
4 changed files with 48 additions and 19 deletions
|
@ -200,6 +200,26 @@ std::optional<bool> Utils::String::parseBool(const QString &string)
|
|||
return std::nullopt;
|
||||
}
|
||||
|
||||
std::optional<int> Utils::String::parseInt(const QString &string)
|
||||
{
|
||||
bool ok = false;
|
||||
const int result = string.toInt(&ok);
|
||||
if (ok)
|
||||
return result;
|
||||
|
||||
return std::nullopt;
|
||||
}
|
||||
|
||||
std::optional<double> Utils::String::parseDouble(const QString &string)
|
||||
{
|
||||
bool ok = false;
|
||||
const double result = string.toDouble(&ok);
|
||||
if (ok)
|
||||
return result;
|
||||
|
||||
return std::nullopt;
|
||||
}
|
||||
|
||||
QString Utils::String::join(const QVector<QStringRef> &strings, const QString &separator)
|
||||
{
|
||||
if (strings.empty())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue