1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 02:57:42 +00:00

Ladybird+LibWebView: Move creation of the SQL client to LibWebView

This lets us remove the direct dependency from Ladybird to LibSQL.
This commit is contained in:
Timothy Flynn 2023-08-31 07:21:54 -04:00 committed by Andreas Kling
parent 5c5a00dd3a
commit e26ead0995
5 changed files with 18 additions and 8 deletions

View file

@ -18,7 +18,6 @@
#include <LibFileSystem/FileSystem.h>
#include <LibGfx/Font/FontDatabase.h>
#include <LibMain/Main.h>
#include <LibSQL/SQLClient.h>
#include <LibWebView/CookieJar.h>
#include <LibWebView/Database.h>
#include <QApplication>
@ -99,8 +98,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
if (enable_sql_database) {
auto sql_server_paths = TRY(get_paths_for_helper_process("SQLServer"sv));
auto sql_client = TRY(SQL::SQLClient::launch_server_and_create_client(move(sql_server_paths)));
database = TRY(WebView::Database::create(move(sql_client)));
database = TRY(WebView::Database::create(move(sql_server_paths)));
}
auto cookie_jar = database ? TRY(WebView::CookieJar::create(*database)) : WebView::CookieJar::create();