Skip to content

Commit cc8c426

Browse files
committed
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. :^)
1 parent 06eb4a7 commit cc8c426

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

Ladybird/WebContent/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ qt_add_executable(WebContent ${WEBCONTENT_SOURCES})
2727

2828
target_include_directories(WebContent PRIVATE ${SERENITY_SOURCE_DIR}/Userland/Services/)
2929
target_include_directories(WebContent PRIVATE ${CMAKE_CURRENT_BINARY_DIR}/..)
30-
target_link_libraries(WebContent PRIVATE Qt::Core Qt::Gui Qt::Network Qt::Multimedia LibAudio LibCore LibFileSystem LibGfx LibIPC LibJS LibMain LibWeb LibWebSocket)
30+
target_link_libraries(WebContent PRIVATE Qt::Core Qt::Network Qt::Multimedia LibAudio LibCore LibFileSystem LibGfx LibIPC LibJS LibMain LibWeb LibWebSocket)
3131
if (ANDROID)
3232
link_android_libs(WebContent)
3333
endif()

Ladybird/WebContent/main.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
#include <LibWeb/PermissionsPolicy/AutoplayAllowlist.h>
3030
#include <LibWeb/Platform/EventLoopPluginSerenity.h>
3131
#include <LibWeb/WebSockets/WebSocket.h>
32-
#include <QGuiApplication>
32+
#include <QCoreApplication>
3333
#include <QTimer>
3434
#include <WebContent/ConnectionFromClient.h>
3535
#include <WebContent/PageHost.h>
@@ -46,7 +46,7 @@ extern DeprecatedString s_serenity_resource_root;
4646

4747
ErrorOr<int> serenity_main(Main::Arguments arguments)
4848
{
49-
QGuiApplication app(arguments.argc, arguments.argv);
49+
QCoreApplication app(arguments.argc, arguments.argv);
5050

5151
#if defined(AK_OS_MACOS)
5252
prohibit_interaction();

0 commit comments

Comments
 (0)