summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibGUI
diff options
context:
space:
mode:
authorSam Atkins <atkinssj@serenityos.org>2023-01-07 12:33:53 +0000
committerLinus Groh <mail@linusgroh.de>2023-01-07 14:39:30 +0100
commit54b1326165dd97ae3dab82360d0e7b029650004d (patch)
treebf0761a91ae3717da5e59356108e6d3260fd9137 /Userland/Libraries/LibGUI
parent703da34947b147763815da9fee89ce2ba05372b7 (diff)
downloadserenity-54b1326165dd97ae3dab82360d0e7b029650004d.zip
Userland: Replace all uses of `load_from_gml` with `try_load_from_gml`
MOAR FIXMES! ;^)
Diffstat (limited to 'Userland/Libraries/LibGUI')
-rw-r--r--Userland/Libraries/LibGUI/EmojiInputDialog.cpp3
-rw-r--r--Userland/Libraries/LibGUI/FilePicker.cpp3
-rw-r--r--Userland/Libraries/LibGUI/FontPicker.cpp3
-rw-r--r--Userland/Libraries/LibGUI/IncrementalSearchBanner.cpp2
-rw-r--r--Userland/Libraries/LibGUI/PasswordInputDialog.cpp3
5 files changed, 5 insertions, 9 deletions
diff --git a/Userland/Libraries/LibGUI/EmojiInputDialog.cpp b/Userland/Libraries/LibGUI/EmojiInputDialog.cpp
index f4d99562d5..5c0752b3bb 100644
--- a/Userland/Libraries/LibGUI/EmojiInputDialog.cpp
+++ b/Userland/Libraries/LibGUI/EmojiInputDialog.cpp
@@ -93,8 +93,7 @@ EmojiInputDialog::EmojiInputDialog(Window* parent_window)
, m_category_action_group(make<ActionGroup>())
{
auto main_widget = set_main_widget<Frame>().release_value_but_fixme_should_propagate_errors();
- if (!main_widget->load_from_gml(emoji_input_dialog_gml))
- VERIFY_NOT_REACHED();
+ main_widget->try_load_from_gml(emoji_input_dialog_gml).release_value_but_fixme_should_propagate_errors();
set_window_type(GUI::WindowType::Popup);
set_window_mode(GUI::WindowMode::Modeless);
diff --git a/Userland/Libraries/LibGUI/FilePicker.cpp b/Userland/Libraries/LibGUI/FilePicker.cpp
index 93cbc3d2d8..8709adf6f6 100644
--- a/Userland/Libraries/LibGUI/FilePicker.cpp
+++ b/Userland/Libraries/LibGUI/FilePicker.cpp
@@ -85,8 +85,7 @@ FilePicker::FilePicker(Window* parent_window, Mode mode, StringView filename, St
resize(560, 320);
auto widget = set_main_widget<GUI::Widget>().release_value_but_fixme_should_propagate_errors();
- if (!widget->load_from_gml(file_picker_dialog_gml))
- VERIFY_NOT_REACHED();
+ widget->try_load_from_gml(file_picker_dialog_gml).release_value_but_fixme_should_propagate_errors();
auto& toolbar = *widget->find_descendant_of_type_named<GUI::Toolbar>("toolbar");
diff --git a/Userland/Libraries/LibGUI/FontPicker.cpp b/Userland/Libraries/LibGUI/FontPicker.cpp
index 0ba0b36600..43b01487ff 100644
--- a/Userland/Libraries/LibGUI/FontPicker.cpp
+++ b/Userland/Libraries/LibGUI/FontPicker.cpp
@@ -27,8 +27,7 @@ FontPicker::FontPicker(Window* parent_window, Gfx::Font const* current_font, boo
set_icon(Gfx::Bitmap::try_load_from_file("/res/icons/16x16/app-font-editor.png"sv).release_value_but_fixme_should_propagate_errors());
auto widget = set_main_widget<GUI::Widget>().release_value_but_fixme_should_propagate_errors();
- if (!widget->load_from_gml(font_picker_dialog_gml))
- VERIFY_NOT_REACHED();
+ widget->try_load_from_gml(font_picker_dialog_gml).release_value_but_fixme_should_propagate_errors();
m_family_list_view = *widget->find_descendant_of_type_named<ListView>("family_list_view");
m_family_list_view->set_model(ItemListModel<DeprecatedString>::create(m_families));
diff --git a/Userland/Libraries/LibGUI/IncrementalSearchBanner.cpp b/Userland/Libraries/LibGUI/IncrementalSearchBanner.cpp
index fe244a36d2..f29643aba7 100644
--- a/Userland/Libraries/LibGUI/IncrementalSearchBanner.cpp
+++ b/Userland/Libraries/LibGUI/IncrementalSearchBanner.cpp
@@ -19,7 +19,7 @@ namespace GUI {
IncrementalSearchBanner::IncrementalSearchBanner(TextEditor& editor)
: m_editor(editor)
{
- load_from_gml(incremental_search_banner_gml);
+ try_load_from_gml(incremental_search_banner_gml).release_value_but_fixme_should_propagate_errors();
m_index_label = find_descendant_of_type_named<Label>("incremental_search_banner_index_label");
m_wrap_search_button = find_descendant_of_type_named<Button>("incremental_search_banner_wrap_search_button");
diff --git a/Userland/Libraries/LibGUI/PasswordInputDialog.cpp b/Userland/Libraries/LibGUI/PasswordInputDialog.cpp
index 7be9cc9d00..28a524c79b 100644
--- a/Userland/Libraries/LibGUI/PasswordInputDialog.cpp
+++ b/Userland/Libraries/LibGUI/PasswordInputDialog.cpp
@@ -23,8 +23,7 @@ PasswordInputDialog::PasswordInputDialog(Window* parent_window, DeprecatedString
set_title(move(title));
auto widget = set_main_widget<Widget>().release_value_but_fixme_should_propagate_errors();
-
- widget->load_from_gml(password_input_dialog_gml);
+ widget->try_load_from_gml(password_input_dialog_gml).release_value_but_fixme_should_propagate_errors();
auto& key_icon_label = *widget->find_descendant_of_type_named<GUI::Label>("key_icon_label");