mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-07-14 17:23:07 -07:00
Allow bool lists in json values
This commit is contained in:
parent
91f9a46c18
commit
9d275d6d34
1 changed files with 6 additions and 1 deletions
|
@ -133,6 +133,11 @@ QVariantMap json::fromJson(const QString& json) {
|
|||
if (list_val.startsWith("\"") && list_val.endsWith("\"")) {
|
||||
varlist << list_val.mid(1, list_val.length()-2).replace("\\n", "\n");
|
||||
} else {
|
||||
if (list_val.compare(("false"), Qt::CaseInsensitive) == 0)
|
||||
varlist << false;
|
||||
else if (list_val.compare(("true"), Qt::CaseInsensitive) == 0)
|
||||
varlist << true;
|
||||
else
|
||||
varlist << list_val.toInt();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue