mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-12-18 22:47:21 -06:00
- Simplified and optimized json code
This commit is contained in:
@@ -160,9 +160,8 @@ void HttpConnection::respondNotFound()
|
||||
|
||||
void HttpConnection::respondJson()
|
||||
{
|
||||
EventManager* manager = parent->eventManager();
|
||||
QVariant data = manager->getEventList();
|
||||
QString string = toJson(data);
|
||||
EventManager* manager = parent->eventManager();
|
||||
QString string = json::toJson(manager->getEventList());
|
||||
generator.setStatusLine(200, "OK");
|
||||
generator.setContentTypeByExt("js");
|
||||
generator.setMessage(string);
|
||||
|
||||
Reference in New Issue
Block a user