mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-07-11 15:56:17 -07:00
Expose 'bdecode limits' settings
This includes: * Bdecode depth limit * Bdecode token limit
This commit is contained in:
parent
66dfe8545d
commit
5a660fc8a9
12 changed files with 98 additions and 13 deletions
|
@ -317,6 +317,32 @@ void Preferences::setTorrentFileSizeLimit(const qint64 value)
|
|||
setValue(u"BitTorrent/TorrentFileSizeLimit"_s, value);
|
||||
}
|
||||
|
||||
int Preferences::getBdecodeDepthLimit() const
|
||||
{
|
||||
return value(u"BitTorrent/BdecodeDepthLimit"_s, 100);
|
||||
}
|
||||
|
||||
void Preferences::setBdecodeDepthLimit(const int value)
|
||||
{
|
||||
if (value == getBdecodeDepthLimit())
|
||||
return;
|
||||
|
||||
setValue(u"BitTorrent/BdecodeDepthLimit"_s, value);
|
||||
}
|
||||
|
||||
int Preferences::getBdecodeTokenLimit() const
|
||||
{
|
||||
return value(u"BitTorrent/BdecodeTokenLimit"_s, 10'000'000);
|
||||
}
|
||||
|
||||
void Preferences::setBdecodeTokenLimit(const int value)
|
||||
{
|
||||
if (value == getBdecodeTokenLimit())
|
||||
return;
|
||||
|
||||
setValue(u"BitTorrent/BdecodeTokenLimit"_s, value);
|
||||
}
|
||||
|
||||
bool Preferences::isToolbarDisplayed() const
|
||||
{
|
||||
return value(u"Preferences/General/ToolbarDisplayed"_s, true);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue