1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 02:17:34 +00:00

Ladybird: Use plain QCoreApplication in WebContent process

Now that we no longer use QFont from LibWeb, we can also stop using
QGuiApplication in the WebContent process entirely.

This removes a whole bunch of unnecessary work from the event loop,
and also allows nice things like running headless-browser while
*actually* headless. :^)
This commit is contained in:
Andreas Kling 2023-07-30 14:37:30 +02:00
parent 06eb4a7557
commit cc8c4266f5
2 changed files with 3 additions and 3 deletions

View file

@ -27,7 +27,7 @@ qt_add_executable(WebContent ${WEBCONTENT_SOURCES})
target_include_directories(WebContent PRIVATE ${SERENITY_SOURCE_DIR}/Userland/Services/) target_include_directories(WebContent PRIVATE ${SERENITY_SOURCE_DIR}/Userland/Services/)
target_include_directories(WebContent PRIVATE ${CMAKE_CURRENT_BINARY_DIR}/..) target_include_directories(WebContent PRIVATE ${CMAKE_CURRENT_BINARY_DIR}/..)
target_link_libraries(WebContent PRIVATE Qt::Core Qt::Gui Qt::Network Qt::Multimedia LibAudio LibCore LibFileSystem LibGfx LibIPC LibJS LibMain LibWeb LibWebSocket) target_link_libraries(WebContent PRIVATE Qt::Core Qt::Network Qt::Multimedia LibAudio LibCore LibFileSystem LibGfx LibIPC LibJS LibMain LibWeb LibWebSocket)
if (ANDROID) if (ANDROID)
link_android_libs(WebContent) link_android_libs(WebContent)
endif() endif()

View file

@ -29,7 +29,7 @@
#include <LibWeb/PermissionsPolicy/AutoplayAllowlist.h> #include <LibWeb/PermissionsPolicy/AutoplayAllowlist.h>
#include <LibWeb/Platform/EventLoopPluginSerenity.h> #include <LibWeb/Platform/EventLoopPluginSerenity.h>
#include <LibWeb/WebSockets/WebSocket.h> #include <LibWeb/WebSockets/WebSocket.h>
#include <QGuiApplication> #include <QCoreApplication>
#include <QTimer> #include <QTimer>
#include <WebContent/ConnectionFromClient.h> #include <WebContent/ConnectionFromClient.h>
#include <WebContent/PageHost.h> #include <WebContent/PageHost.h>
@ -46,7 +46,7 @@ extern DeprecatedString s_serenity_resource_root;
ErrorOr<int> serenity_main(Main::Arguments arguments) ErrorOr<int> serenity_main(Main::Arguments arguments)
{ {
QGuiApplication app(arguments.argc, arguments.argv); QCoreApplication app(arguments.argc, arguments.argv);
#if defined(AK_OS_MACOS) #if defined(AK_OS_MACOS)
prohibit_interaction(); prohibit_interaction();