Remove unused parseJSONFromReply2 function

This commit is contained in:
Rasmus Karlsson 2018-07-06 20:02:30 +00:00
parent efbd0f31e6
commit 256aabf746

View file

@ -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: