mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-12-21 07:57:22 -06:00
Allow semicolon in json values (Windows paths support)
This commit is contained in:
committed by
Christophe Dumez
parent
3762401cd9
commit
2dbbfc1031
@@ -114,7 +114,10 @@ QVariantMap json::fromJson(const QString& json) {
|
||||
if (!tmp.isEmpty()) couples << tmp;
|
||||
|
||||
foreach (const QString &couple, couples) {
|
||||
QStringList parts = couple.split(":");
|
||||
QStringList parts;
|
||||
qint32 jsonSep = couple.indexOf(":");
|
||||
parts << couple.mid(0, jsonSep);
|
||||
parts << couple.mid(jsonSep + 1);
|
||||
if (parts.size() != 2) continue;
|
||||
QString key = parts.first();
|
||||
if (key.startsWith("\"") && key.endsWith("\"")) {
|
||||
|
||||
Reference in New Issue
Block a user