From 8d7ac0a70809d546599f13adb8bb577c8b7e17f7 Mon Sep 17 00:00:00 2001 From: Qv2ray-dev <59914293+Qv2ray-dev@users.noreply.github.com> Date: Wed, 11 Mar 2020 20:57:04 +0800 Subject: [PATCH] Revert "add: added support with comment-json" This reverts commit a5cf9222ff4823c3d81a63bfa41484777c7e4be2. --- src/common/QvHelpers.cpp | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/common/QvHelpers.cpp b/src/common/QvHelpers.cpp index 1bca9224..1999b94c 100644 --- a/src/common/QvHelpers.cpp +++ b/src/common/QvHelpers.cpp @@ -1,7 +1,5 @@ #include "common/QvHelpers.hpp" -#include "libs/puresource/src/PureJson.hpp" - #include #include #include @@ -44,8 +42,7 @@ namespace Qv2ray::common QTextCodec::ConverterState state; QTextCodec *codec = QTextCodec::codecForName("UTF-8"); const QString text = codec->toUnicode(byteArray.constData(), byteArray.size(), &state); - if (state.invalidChars > 0) - { + if (state.invalidChars > 0) { LOG(MODULE_FILEIO, "Not a valid UTF-8 sequence: " + source->fileName()) return source->readAll(); } @@ -76,7 +73,7 @@ namespace Qv2ray::common QJsonObject JSONFromFile(QFile *sourceFile) { - QString json = RemoveComment(StringFromFile(sourceFile)); + QString json = StringFromFile(sourceFile); return JsonFromString(json); }