mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-07-15 01:33:07 -07:00
- Simplified and optimized json code
This commit is contained in:
parent
0d078f660a
commit
b8c79e0b5f
7 changed files with 80 additions and 123 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue