LibWebView+Services+UI: Move the EventLoop implementations to LibWebView

We currently compile the Qt event loop files multiple times, for every
target which wants to use them. This patch moves these to LibWebView as
a central location to avoid this.
This commit is contained in:
Timothy Flynn 2024-11-10 09:23:10 -05:00 committed by Tim Flynn
commit 9e1f001ffe
Notes: github-actions[bot] 2024-11-11 12:36:54 +00:00
17 changed files with 98 additions and 91 deletions

View file

@ -12,12 +12,12 @@
#include <LibMain/Main.h>
#include <LibWebView/Application.h>
#include <LibWebView/ChromeProcess.h>
#include <LibWebView/EventLoop/EventLoopImplementationQt.h>
#include <LibWebView/ProcessManager.h>
#include <LibWebView/URL.h>
#include <UI/HelperProcess.h>
#include <UI/Qt/Application.h>
#include <UI/Qt/BrowserWindow.h>
#include <UI/Qt/EventLoopImplementationQt.h>
#include <UI/Qt/Settings.h>
#include <UI/Qt/WebContentView.h>
#include <UI/Utilities.h>
@ -64,11 +64,11 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
{
AK::set_rich_debug_enabled(true);
Core::EventLoopManager::install(*new Ladybird::EventLoopManagerQt);
Core::EventLoopManager::install(*new WebView::EventLoopManagerQt);
auto app = Ladybird::Application::create(arguments, ak_url_from_qstring(Ladybird::Settings::the()->new_tab_page()));
static_cast<Ladybird::EventLoopImplementationQt&>(Core::EventLoop::current().impl()).set_main_loop();
static_cast<WebView::EventLoopImplementationQt&>(Core::EventLoop::current().impl()).set_main_loop();
TRY(handle_attached_debugger());
platform_init();