1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 11:58:12 +00:00

Ladybird/Qt: Make String allocation infallible

This commit is contained in:
Timothy Flynn 2023-12-04 10:08:16 -05:00 committed by Andrew Kaster
parent 82c827fc56
commit a21998003c
10 changed files with 27 additions and 32 deletions

View file

@ -72,7 +72,7 @@ public:
break;
auto const& open_event = *static_cast<QFileOpenEvent const*>(event);
auto file = MUST(ak_string_from_qstring(open_event.file()));
auto file = ak_string_from_qstring(open_event.file());
if (auto file_url = WebView::sanitize_url(file); file_url.has_value())
on_open_file(file_url.release_value());
@ -137,7 +137,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
if (initial_urls.is_empty()) {
auto new_tab_page = Ladybird::Settings::the()->new_tab_page();
initial_urls.append(MUST(ak_string_from_qstring(new_tab_page)));
initial_urls.append(ak_string_from_qstring(new_tab_page));
}
Ladybird::WebContentOptions web_content_options {