mirror of
https://github.com/Qv2ray/Qv2ray.git
synced 2025-05-20 02:40:20 +08:00
Revert "add: added support with comment-json"
This reverts commit a5cf9222ff
.
This commit is contained in:
parent
a5cf9222ff
commit
8d7ac0a708
@ -1,7 +1,5 @@
|
||||
#include "common/QvHelpers.hpp"
|
||||
|
||||
#include "libs/puresource/src/PureJson.hpp"
|
||||
|
||||
#include <QGraphicsEffect>
|
||||
#include <QGraphicsProxyWidget>
|
||||
#include <QGraphicsScene>
|
||||
@ -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);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user