mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 09:38:11 +00:00
LibCore: Convert CHttpJob to ObjectPtr
This commit is contained in:
parent
953cb4e436
commit
6b347747f2
8 changed files with 45 additions and 13 deletions
|
@ -29,13 +29,13 @@ void ThreadCatalogModel::update()
|
|||
CHttpRequest request;
|
||||
request.set_url(String::format("http://a.4cdn.org/%s/catalog.json", m_board.characters()));
|
||||
|
||||
auto* job = request.schedule();
|
||||
m_pending_job = request.schedule();
|
||||
|
||||
if (on_load_started)
|
||||
on_load_started();
|
||||
|
||||
job->on_finish = [job, this](bool success) {
|
||||
auto* response = job->response();
|
||||
m_pending_job->on_finish = [this](bool success) {
|
||||
auto* response = m_pending_job->response();
|
||||
dbg() << "Catalog download finished, success=" << success << ", response=" << response;
|
||||
|
||||
if (!success) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue