mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-07-29 19:18:42 -07:00
Change parseBool() to return optional bool value
This commit is contained in:
parent
4429a16ca8
commit
d0cac421bb
6 changed files with 24 additions and 19 deletions
|
@ -264,7 +264,7 @@ void SearchController::enablePluginAction()
|
|||
requireParams({"names", "enable"});
|
||||
|
||||
const QStringList names = params()["names"].split('|');
|
||||
const bool enable = Utils::String::parseBool(params()["enable"].trimmed(), false);
|
||||
const bool enable = Utils::String::parseBool(params()["enable"].trimmed()).value_or(false);
|
||||
|
||||
for (const QString &name : names)
|
||||
SearchPluginManager::instance()->enablePlugin(name.trimmed(), enable);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue