summaryrefslogtreecommitdiff
path: root/Ladybird/WebContent/main.cpp
diff options
context:
space:
mode:
authorAndrew Kaster <andrewdkaster@gmail.com>2022-10-07 17:08:29 -0600
committerAndrew Kaster <andrewdkaster@gmail.com>2022-12-25 07:58:58 -0700
commit6fff03713ccc1bb82bffe172cc41f2d5c28901dc (patch)
treec2a99dc80b33668d743326c92b0e888439e0d944 /Ladybird/WebContent/main.cpp
parentbbb08c1912656d0c871120c0826265f60e9fd550 (diff)
downloadserenity-6fff03713ccc1bb82bffe172cc41f2d5c28901dc.zip
Ladybird: Ensure that installed ladybird can launch WebContent process
Always call platform_init after there's a QApplication, because in the installed configuration that's how we find the resources. Try QCoreApplication::applicationDirPath() after looking in ./WebContent for the WebContent process. In an installed configuration, ladybird and WebContent will both be in $PREFIX/bin. Add install rules for WebContent and its linked libraries, for if they ever differ from ladybird's.
Diffstat (limited to 'Ladybird/WebContent/main.cpp')
-rw-r--r--Ladybird/WebContent/main.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/Ladybird/WebContent/main.cpp b/Ladybird/WebContent/main.cpp
index 911348b3b1..2623693cfa 100644
--- a/Ladybird/WebContent/main.cpp
+++ b/Ladybird/WebContent/main.cpp
@@ -38,10 +38,10 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
// FIXME: Refactor things so we can get rid of this somehow.
Core::EventLoop event_loop;
- platform_init();
-
QGuiApplication app(arguments.argc, arguments.argv);
+ platform_init();
+
Web::Platform::EventLoopPlugin::install(*new Ladybird::EventLoopPluginQt);
Web::Platform::ImageCodecPlugin::install(*new Ladybird::ImageCodecPluginLadybird);