mirror of
https://github.com/Chatterino/chatterino2.git
synced 2024-11-13 19:49:51 +01:00
Remove unused parseJSONFromReply2 function
This commit is contained in:
parent
efbd0f31e6
commit
256aabf746
|
@ -39,26 +39,6 @@ static rapidjson::Document parseJSONFromData2(const QByteArray &data)
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
static rapidjson::Document parseJSONFromReply2(QNetworkReply *reply)
|
|
||||||
{
|
|
||||||
rapidjson::Document ret(rapidjson::kNullType);
|
|
||||||
|
|
||||||
if (reply->error() != QNetworkReply::NetworkError::NoError) {
|
|
||||||
return ret;
|
|
||||||
}
|
|
||||||
|
|
||||||
QByteArray data = reply->readAll();
|
|
||||||
rapidjson::ParseResult result = ret.Parse(data.data(), data.length());
|
|
||||||
|
|
||||||
if (result.Code() != rapidjson::kParseErrorNone) {
|
|
||||||
Log("JSON parse error: {} ({})", rapidjson::GetParseError_En(result.Code()),
|
|
||||||
result.Offset());
|
|
||||||
return ret;
|
|
||||||
}
|
|
||||||
|
|
||||||
return ret;
|
|
||||||
}
|
|
||||||
|
|
||||||
class NetworkRequest
|
class NetworkRequest
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
|
Loading…
Reference in a new issue