mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-12-31 12:48:04 -06:00
Accept "share limits" when adding torrent using WebAPI
This commit is contained in:
committed by
sledgehammer999
parent
9971329121
commit
ae2bb4efeb
@@ -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())
|
||||
|
||||
Reference in New Issue
Block a user