Browse Source

Allow semicolon in json values (Windows paths support)

adaptive-webui-19844
Nick Tiskov 12 years ago
parent
commit
91f9a46c18
  1. 5
      src/webui/json.cpp

5
src/webui/json.cpp

@ -114,7 +114,10 @@ QVariantMap json::fromJson(const QString& json) {
if (!tmp.isEmpty()) couples << tmp; if (!tmp.isEmpty()) couples << tmp;
foreach (const QString &couple, couples) { 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; if (parts.size() != 2) continue;
QString key = parts.first(); QString key = parts.first();
if (key.startsWith("\"") && key.endsWith("\"")) { if (key.startsWith("\"") && key.endsWith("\"")) {

Loading…
Cancel
Save