From 91f9a46c18f50b44af6c408c230c9ff23efaacb9 Mon Sep 17 00:00:00 2001 From: Nick Tiskov Date: Wed, 27 Feb 2013 12:58:14 +0400 Subject: [PATCH] Allow semicolon in json values (Windows paths support) --- src/webui/json.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/webui/json.cpp b/src/webui/json.cpp index bf90507d4..e0cdef964 100644 --- a/src/webui/json.cpp +++ b/src/webui/json.cpp @@ -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("\"")) {