1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-28 15:47:34 +00:00

Ladybird: Use QtNetwork for HTTP and HTTPS requests

Until we can get our own RequestServer infrastructure up and running,
running the TLS and HTTP code in-process was causing lots of crashes
due to unexpected reentrancy via nested event loops.

This patch adds a simple backend for HTTP and HTTPS requests that simply
funnels them through QNetworkAccessManager.
This commit is contained in:
Andreas Kling 2022-07-05 21:13:38 +02:00 committed by Andrew Kaster
parent 69d264828f
commit 419d3ec646
4 changed files with 152 additions and 278 deletions

View file

@ -30,19 +30,20 @@ include(${Lagom_SOURCE_DIR}/../CMake/lagom_compile_options.cmake)
add_compile_options(-Wno-expansion-to-defined)
set(CMAKE_AUTOMOC ON)
find_package(Qt6 REQUIRED COMPONENTS Core Widgets)
find_package(Qt6 REQUIRED COMPONENTS Core Widgets Network)
# FIXME: Stop using deprecated declarations from QT :^)
add_compile_options(-Wno-deprecated-declarations)
set(SOURCES
BrowserWindow.cpp
RequestManagerQt.cpp
main.cpp
WebView.cpp
)
add_executable(ladybird ${SOURCES})
target_link_libraries(ladybird PRIVATE Qt6::Widgets Lagom::Web Lagom::HTTP Lagom::WebSocket Lagom::Main)
target_link_libraries(ladybird PRIVATE Qt6::Widgets Qt::Network Lagom::Web Lagom::WebSocket Lagom::Main)
get_filename_component(
SERENITY_SOURCE_DIR "${Lagom_SOURCE_DIR}/../.."