Skip to content

Commit

Permalink
Userland: Replace all uses of load_from_gml with try_load_from_gml
Browse files Browse the repository at this point in the history
MOAR FIXMES! ;^)
  • Loading branch information
AtkinsSJ authored and linusg committed Jan 7, 2023
1 parent 703da34 commit 54b1326
Show file tree
Hide file tree
Showing 78 changed files with 94 additions and 111 deletions.
3 changes: 1 addition & 2 deletions Userland/Applications/Browser/BookmarksBarWidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,7 @@ class BookmarkEditor final : public GUI::Dialog {
: Dialog(parent_window)
{
auto widget = set_main_widget<GUI::Widget>().release_value_but_fixme_should_propagate_errors();
if (!widget->load_from_gml(edit_bookmark_gml))
VERIFY_NOT_REACHED();
widget->try_load_from_gml(edit_bookmark_gml).release_value_but_fixme_should_propagate_errors();

set_resizable(false);
resize(260, 85);
Expand Down
2 changes: 1 addition & 1 deletion Userland/Applications/Browser/BrowserWindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ BrowserWindow::BrowserWindow(CookieJar& cookie_jar, URL url)
set_title("Browser");

auto widget = set_main_widget<GUI::Widget>().release_value_but_fixme_should_propagate_errors();
widget->load_from_gml(browser_window_gml);
widget->try_load_from_gml(browser_window_gml).release_value_but_fixme_should_propagate_errors();

auto& top_line = *widget->find_descendant_of_type_named<GUI::HorizontalSeparator>("top_line");

Expand Down
2 changes: 1 addition & 1 deletion Userland/Applications/Browser/History/HistoryWidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
namespace Browser {
HistoryWidget::HistoryWidget()
{
load_from_gml(history_widget_gml);
try_load_from_gml(history_widget_gml).release_value_but_fixme_should_propagate_errors();

m_table_view = find_descendant_of_type_named<GUI::TableView>("history_tableview");
m_textbox = find_descendant_of_type_named<GUI::TextBox>("history_filter_textbox");
Expand Down
2 changes: 1 addition & 1 deletion Userland/Applications/Browser/StorageWidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ namespace Browser {

StorageWidget::StorageWidget()
{
load_from_gml(storage_widget_gml);
try_load_from_gml(storage_widget_gml).release_value_but_fixme_should_propagate_errors();
auto& tab_widget = *find_descendant_of_type_named<GUI::TabWidget>("tab_widget");

m_cookies_table_view = tab_widget.find_descendant_of_type_named<GUI::TableView>("cookies_tableview");
Expand Down
2 changes: 1 addition & 1 deletion Userland/Applications/Browser/Tab.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ void Tab::update_status(Optional<DeprecatedString> text_override, i32 count_wait

Tab::Tab(BrowserWindow& window)
{
load_from_gml(tab_gml);
try_load_from_gml(tab_gml).release_value_but_fixme_should_propagate_errors();

m_toolbar_container = *find_descendant_of_type_named<GUI::ToolbarContainer>("toolbar_container");
auto& toolbar = *find_descendant_of_type_named<GUI::Toolbar>("toolbar");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ class ColorSchemeModel final : public GUI::Model {

BrowserSettingsWidget::BrowserSettingsWidget()
{
load_from_gml(browser_settings_widget_gml);
try_load_from_gml(browser_settings_widget_gml).release_value_but_fixme_should_propagate_errors();

m_homepage_url_textbox = find_descendant_of_type_named<GUI::TextBox>("homepage_url_textbox");
m_homepage_url_textbox->set_text(Config::read_string("Browser"sv, "Preferences"sv, "Home"sv, default_homepage_url), GUI::AllowCallback::No);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ void DomainListModel::reset_default_values()

ContentFilterSettingsWidget::ContentFilterSettingsWidget()
{
load_from_gml(content_filter_settings_widget_gml);
try_load_from_gml(content_filter_settings_widget_gml).release_value_but_fixme_should_propagate_errors();
m_enable_content_filtering_checkbox = find_descendant_of_type_named<GUI::CheckBox>("enable_content_filtering_checkbox");
m_domain_list_view = find_descendant_of_type_named<GUI::ListView>("domain_list_view");
m_add_new_domain_button = find_descendant_of_type_named<GUI::Button>("add_new_domain_button");
Expand Down
2 changes: 1 addition & 1 deletion Userland/Applications/Calculator/CalculatorWidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

CalculatorWidget::CalculatorWidget()
{
load_from_gml(calculator_gml);
try_load_from_gml(calculator_gml).release_value_but_fixme_should_propagate_errors();

m_entry = *find_descendant_of_type_named<GUI::TextBox>("entry_textbox");
m_entry->set_relative_rect(5, 5, 244, 26);
Expand Down
2 changes: 1 addition & 1 deletion Userland/Applications/Calendar/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
window->set_icon(app_icon.bitmap_for_size(16));

auto main_widget = TRY(window->set_main_widget<GUI::Widget>());
main_widget->load_from_gml(calendar_window_gml);
TRY(main_widget->try_load_from_gml(calendar_window_gml));

auto toolbar = main_widget->find_descendant_of_type_named<GUI::Toolbar>("toolbar");
auto calendar = main_widget->find_descendant_of_type_named<GUI::Calendar>("calendar");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ void CalendarSettingsWidget::reset_default_values()

CalendarSettingsWidget::CalendarSettingsWidget()
{
load_from_gml(calendar_settings_widget_gml);
try_load_from_gml(calendar_settings_widget_gml).release_value_but_fixme_should_propagate_errors();

m_first_day_of_week_combobox = *find_descendant_of_type_named<GUI::ComboBox>("first_day_of_week");
m_first_day_of_week_combobox->set_text(Config::read_string("Calendar"sv, "View"sv, "FirstDayOfWeek"sv, "Sunday"sv));
Expand Down
2 changes: 1 addition & 1 deletion Userland/Applications/CharacterMap/CharacterMapWidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@

CharacterMapWidget::CharacterMapWidget()
{
load_from_gml(character_map_window_gml);
try_load_from_gml(character_map_window_gml).release_value_but_fixme_should_propagate_errors();

m_toolbar = find_descendant_of_type_named<GUI::Toolbar>("toolbar");
m_font_name_label = find_descendant_of_type_named<GUI::Label>("font_name");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ class CharacterSearchModel final : public GUI::Model {

CharacterSearchWidget::CharacterSearchWidget()
{
load_from_gml(character_search_window_gml);
try_load_from_gml(character_search_window_gml).release_value_but_fixme_should_propagate_errors();

m_search_input = find_descendant_of_type_named<GUI::TextBox>("search_input");
m_search_button = find_descendant_of_type_named<GUI::Button>("search_button");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ constexpr auto time_format_24h_seconds = "%T"sv;

ClockSettingsWidget::ClockSettingsWidget()
{
load_from_gml(clock_settings_widget_gml);
try_load_from_gml(clock_settings_widget_gml).release_value_but_fixme_should_propagate_errors();

m_24_hour_radio = *find_descendant_of_type_named<GUI::RadioButton>("24hour_radio");
auto& twelve_hour_radio = *find_descendant_of_type_named<GUI::RadioButton>("12hour_radio");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ ErrorOr<NonnullRefPtr<TimeZoneSettingsWidget>> TimeZoneSettingsWidget::create()

TimeZoneSettingsWidget::TimeZoneSettingsWidget()
{
load_from_gml(time_zone_settings_widget_gml);
try_load_from_gml(time_zone_settings_widget_gml).release_value_but_fixme_should_propagate_errors();

static auto time_zones = TimeZone::all_time_zones();
m_time_zone = TimeZone::system_time_zone();
Expand Down
2 changes: 1 addition & 1 deletion Userland/Applications/CrashReporter/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
};

auto widget = TRY(window->set_main_widget<GUI::Widget>());
widget->load_from_gml(crash_reporter_window_gml);
TRY(widget->try_load_from_gml(crash_reporter_window_gml));

auto& icon_image_widget = *widget->find_descendant_of_type_named<GUI::ImageWidget>("icon");
icon_image_widget.set_bitmap(GUI::FileIconProvider::icon_for_executable(executable_path).bitmap_for_size(32));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ BackgroundSettingsWidget::BackgroundSettingsWidget(bool& background_settings_cha

void BackgroundSettingsWidget::create_frame()
{
load_from_gml(background_settings_gml);
try_load_from_gml(background_settings_gml).release_value_but_fixme_should_propagate_errors();

m_monitor_widget = *find_descendant_of_type_named<DisplaySettings::MonitorWidget>("monitor_widget");

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ DesktopSettingsWidget::DesktopSettingsWidget()

void DesktopSettingsWidget::create_frame()
{
load_from_gml(desktop_settings_gml);
try_load_from_gml(desktop_settings_gml).release_value_but_fixme_should_propagate_errors();

m_workspace_rows_spinbox = *find_descendant_of_type_named<GUI::SpinBox>("workspace_rows_spinbox");
m_workspace_rows_spinbox->on_change = [&](auto) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ namespace DisplaySettings {

EffectsSettingsWidget::EffectsSettingsWidget()
{
load_from_gml(effects_settings_gml);
try_load_from_gml(effects_settings_gml).release_value_but_fixme_should_propagate_errors();

m_geometry_combobox = find_descendant_of_type_named<ComboBox>("geometry_combobox");
m_geometry_combobox->set_only_allow_values_from_model(true);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ static void update_label_with_font(GUI::Label&, Gfx::Font const&);

FontSettingsWidget::FontSettingsWidget()
{
load_from_gml(font_settings_gml);
try_load_from_gml(font_settings_gml).release_value_but_fixme_should_propagate_errors();

auto& default_font = Gfx::FontDatabase::default_font();
m_default_font_label = *find_descendant_of_type_named<GUI::Label>("default_font_label");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ void MonitorSettingsWidget::create_resolution_list()

void MonitorSettingsWidget::create_frame()
{
load_from_gml(monitor_settings_window_gml);
try_load_from_gml(monitor_settings_window_gml).release_value_but_fixme_should_propagate_errors();

m_monitor_widget = *find_descendant_of_type_named<DisplaySettings::MonitorWidget>("monitor_widget");

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ namespace DisplaySettings {
ThemesSettingsWidget::ThemesSettingsWidget(bool& background_settings_changed)
: m_background_settings_changed { background_settings_changed }
{
load_from_gml(themes_settings_gml);
try_load_from_gml(themes_settings_gml).release_value_but_fixme_should_propagate_errors();
m_themes = MUST(Gfx::list_installed_system_themes());

size_t current_theme_index;
Expand Down
2 changes: 1 addition & 1 deletion Userland/Applications/Escalator/EscalatorWindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ EscalatorWindow::EscalatorWindow(StringView executable, Vector<StringView> argum
set_minimizable(false);

auto main_widget = set_main_widget<GUI::Widget>().release_value_but_fixme_should_propagate_errors();
main_widget->load_from_gml(escalator_gml);
main_widget->try_load_from_gml(escalator_gml).release_value_but_fixme_should_propagate_errors();

RefPtr<GUI::Label> app_label = *main_widget->find_descendant_of_type_named<GUI::Label>("description");

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ FileOperationProgressWidget::FileOperationProgressWidget(FileOperation operation
: m_operation(operation)
, m_helper_pipe(move(helper_pipe))
{
load_from_gml(file_operation_progress_gml);
try_load_from_gml(file_operation_progress_gml).release_value_but_fixme_should_propagate_errors();

auto& button = *find_descendant_of_type_named<GUI::Button>("button");

Expand Down
2 changes: 1 addition & 1 deletion Userland/Applications/FileManager/PropertiesWindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ PropertiesWindow::PropertiesWindow(DeprecatedString const& path, bool disable_re
auto& tab_widget = main_widget->add<GUI::TabWidget>();

auto& general_tab = tab_widget.add_tab<GUI::Widget>("General");
general_tab.load_from_gml(properties_window_general_tab_gml);
general_tab.try_load_from_gml(properties_window_general_tab_gml).release_value_but_fixme_should_propagate_errors();

m_name = lexical_path.basename();
m_path = lexical_path.string();
Expand Down
3 changes: 1 addition & 2 deletions Userland/Applications/FileManager/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -580,8 +580,7 @@ ErrorOr<int> run_in_windowed_mode(DeprecatedString const& initial_location, Depr
auto was_maximized = Config::read_bool("FileManager"sv, "Window"sv, "Maximized"sv, false);

auto widget = TRY(window->set_main_widget<GUI::Widget>());

widget->load_from_gml(file_manager_window_gml);
TRY(widget->try_load_from_gml(file_manager_window_gml));

auto& toolbar_container = *widget->find_descendant_of_type_named<GUI::ToolbarContainer>("toolbar_container");
auto& main_toolbar = *widget->find_descendant_of_type_named<GUI::Toolbar>("main_toolbar");
Expand Down
4 changes: 2 additions & 2 deletions Userland/Applications/FontEditor/MainWidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ ErrorOr<RefPtr<GUI::Window>> MainWidget::create_preview_window()
window->center_within(*this->window());

auto main_widget = TRY(window->set_main_widget<GUI::Widget>());
main_widget->load_from_gml(font_preview_window_gml);
TRY(main_widget->try_load_from_gml(font_preview_window_gml));

m_preview_label = find_descendant_of_type_named<GUI::Label>("preview_label");
m_preview_label->set_font(edited_font());
Expand Down Expand Up @@ -420,7 +420,7 @@ ErrorOr<void> MainWidget::create_undo_stack()

MainWidget::MainWidget()
{
load_from_gml(font_editor_window_gml);
try_load_from_gml(font_editor_window_gml).release_value_but_fixme_should_propagate_errors();

m_font_metadata_groupbox = find_descendant_of_type_named<GUI::GroupBox>("font_metadata_groupbox");
m_unicode_block_container = find_descendant_of_type_named<GUI::Widget>("unicode_block_container");
Expand Down
4 changes: 2 additions & 2 deletions Userland/Applications/FontEditor/NewFontDialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ NewFontDialog::NewFontDialog(GUI::Window* parent_window)
set_title("New Font");

m_font_properties_page = GUI::WizardPage::construct("Typeface properties", "Edit details about this font.");
m_font_properties_page->body_widget().load_from_gml(new_font_dialog_page_1_gml);
m_font_properties_page->body_widget().try_load_from_gml(new_font_dialog_page_1_gml).release_value_but_fixme_should_propagate_errors();

m_name_textbox = m_font_properties_page->body_widget().find_descendant_of_type_named<GUI::TextBox>("name_textbox");
m_family_textbox = m_font_properties_page->body_widget().find_descendant_of_type_named<GUI::TextBox>("family_textbox");
Expand Down Expand Up @@ -156,7 +156,7 @@ NewFontDialog::NewFontDialog(GUI::Window* parent_window)
};

m_glyph_properties_page = GUI::WizardPage::construct("Glyph properties", "Edit details about this font.");
m_glyph_properties_page->body_widget().load_from_gml(new_font_dialog_page_2_gml);
m_glyph_properties_page->body_widget().try_load_from_gml(new_font_dialog_page_2_gml).release_value_but_fixme_should_propagate_errors();
m_glyph_properties_page->set_is_final_page(true);

m_glyph_height_spinbox = m_glyph_properties_page->body_widget().find_descendant_of_type_named<GUI::SpinBox>("height_spinbox");
Expand Down
2 changes: 1 addition & 1 deletion Userland/Applications/GamesSettings/CardSettingsWidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ static constexpr StringView default_card_back_image_path = "/res/icons/cards/bug

CardSettingsWidget::CardSettingsWidget()
{
load_from_gml(card_settings_widget_gml);
try_load_from_gml(card_settings_widget_gml).release_value_but_fixme_should_propagate_errors();

auto background_color = Gfx::Color::from_string(Config::read_string("Games"sv, "Cards"sv, "BackgroundColor"sv)).value_or(Gfx::Color::from_rgb(0x008000));

Expand Down
2 changes: 1 addition & 1 deletion Userland/Applications/Help/MainWidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ namespace Help {

MainWidget::MainWidget()
{
load_from_gml(help_window_gml);
try_load_from_gml(help_window_gml).release_value_but_fixme_should_propagate_errors();
m_toolbar = find_descendant_of_type_named<GUI::Toolbar>("toolbar");
m_tab_widget = find_descendant_of_type_named<GUI::TabWidget>("tab_widget");
m_search_container = find_descendant_of_type_named<GUI::Widget>("search_container");
Expand Down
3 changes: 1 addition & 2 deletions Userland/Applications/HexEditor/FindDialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,7 @@ FindDialog::FindDialog()
set_title("Find");

auto main_widget = set_main_widget<GUI::Widget>().release_value_but_fixme_should_propagate_errors();
if (!main_widget->load_from_gml(find_dialog_gml))
VERIFY_NOT_REACHED();
main_widget->try_load_from_gml(find_dialog_gml).release_value_but_fixme_should_propagate_errors();

m_text_editor = *main_widget->find_descendant_of_type_named<GUI::TextBox>("text_editor");
m_find_button = *main_widget->find_descendant_of_type_named<GUI::Button>("find_button");
Expand Down
3 changes: 1 addition & 2 deletions Userland/Applications/HexEditor/GoToOffsetDialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,7 @@ GoToOffsetDialog::GoToOffsetDialog()
set_title("Go to Offset");

auto main_widget = set_main_widget<GUI::Widget>().release_value_but_fixme_should_propagate_errors();
if (!main_widget->load_from_gml(go_to_offset_dialog_gml))
VERIFY_NOT_REACHED();
main_widget->try_load_from_gml(go_to_offset_dialog_gml).release_value_but_fixme_should_propagate_errors();

m_text_editor = *main_widget->find_descendant_of_type_named<GUI::TextBox>("text_editor");
m_go_button = *main_widget->find_descendant_of_type_named<GUI::Button>("go_button");
Expand Down
2 changes: 1 addition & 1 deletion Userland/Applications/HexEditor/HexEditorWidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ REGISTER_WIDGET(HexEditor, HexEditor);

HexEditorWidget::HexEditorWidget()
{
load_from_gml(hex_editor_window_gml);
try_load_from_gml(hex_editor_window_gml).release_value_but_fixme_should_propagate_errors();

m_toolbar = *find_descendant_of_type_named<GUI::Toolbar>("toolbar");
m_toolbar_container = *find_descendant_of_type_named<GUI::ToolbarContainer>("toolbar_container");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,7 @@ class KeymapSelectionDialog final : public GUI::Dialog {
: Dialog(parent_window)
{
auto widget = set_main_widget<GUI::Widget>().release_value_but_fixme_should_propagate_errors();
if (!widget->load_from_gml(keymap_dialog_gml))
VERIFY_NOT_REACHED();
widget->try_load_from_gml(keymap_dialog_gml).release_value_but_fixme_should_propagate_errors();

set_resizable(false);
resize(190, 54);
Expand Down Expand Up @@ -152,7 +151,7 @@ class KeymapModel final : public GUI::Model {

KeyboardSettingsWidget::KeyboardSettingsWidget()
{
load_from_gml(keyboard_widget_gml);
try_load_from_gml(keyboard_widget_gml).release_value_but_fixme_should_propagate_errors();

auto proc_keymap = Core::File::construct("/sys/kernel/keymap");
if (!proc_keymap->open(Core::OpenMode::ReadOnly))
Expand Down
2 changes: 1 addition & 1 deletion Userland/Applications/Mail/MailWidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@

MailWidget::MailWidget()
{
load_from_gml(mail_window_gml);
try_load_from_gml(mail_window_gml).release_value_but_fixme_should_propagate_errors();

m_mailbox_list = *find_descendant_of_type_named<GUI::TreeView>("mailbox_list");
m_individual_mailbox_view = *find_descendant_of_type_named<GUI::TableView>("individual_mailbox_view");
Expand Down
2 changes: 1 addition & 1 deletion Userland/Applications/MailSettings/MailSettingsWidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ MailSettingsWidget::MailSettingsWidget()
m_common_ports.append("143");
m_common_ports.append("993");

load_from_gml(mail_settings_widget_gml);
try_load_from_gml(mail_settings_widget_gml).release_value_but_fixme_should_propagate_errors();

m_server_inputbox = *find_descendant_of_type_named<GUI::TextBox>("server_input");
m_server_inputbox->set_text(Config::read_string("Mail"sv, "Connection"sv, "Server"sv, ""sv));
Expand Down
2 changes: 1 addition & 1 deletion Userland/Applications/MouseSettings/HighlightWidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

HighlightWidget::HighlightWidget()
{
load_from_gml(highlight_widget_gml);
try_load_from_gml(highlight_widget_gml).release_value_but_fixme_should_propagate_errors();

m_highlight_preview = find_descendant_of_type_named<GUI::Frame>("preview_frame")->add<MouseSettings::HighlightPreviewWidget>(palette());

Expand Down
2 changes: 1 addition & 1 deletion Userland/Applications/MouseSettings/MouseWidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ constexpr int double_click_speed_default = 250;

MouseWidget::MouseWidget()
{
load_from_gml(mouse_widget_gml);
try_load_from_gml(mouse_widget_gml).release_value_but_fixme_should_propagate_errors();

m_speed_label = *find_descendant_of_type_named<GUI::Label>("speed_label");
m_speed_slider = *find_descendant_of_type_named<GUI::HorizontalSlider>("speed_slider");
Expand Down
2 changes: 1 addition & 1 deletion Userland/Applications/MouseSettings/ThemeWidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ void ThemeModel::invalidate()

ThemeWidget::ThemeWidget()
{
load_from_gml(theme_widget_gml);
try_load_from_gml(theme_widget_gml).release_value_but_fixme_should_propagate_errors();
m_cursors_tableview = find_descendant_of_type_named<GUI::TableView>("cursors_tableview");
m_cursors_tableview->set_highlight_selected_rows(true);
m_cursors_tableview->set_alternating_row_colors(false);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ static int netmask_to_cidr(IPv4Address const& address)

NetworkSettingsWidget::NetworkSettingsWidget()
{
load_from_gml(network_settings_gml);
try_load_from_gml(network_settings_gml).release_value_but_fixme_should_propagate_errors();

m_adapters_combobox = *find_descendant_of_type_named<GUI::ComboBox>("adapters_combobox");
m_enabled_checkbox = *find_descendant_of_type_named<GUI::CheckBox>("enabled_checkbox");
Expand Down
2 changes: 1 addition & 1 deletion Userland/Applications/PartitionEditor/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
}

auto widget = TRY(window->set_main_widget<GUI::Widget>());
widget->load_from_gml(partition_editor_window_gml);
TRY(widget->try_load_from_gml(partition_editor_window_gml));

auto device_paths = get_device_paths();

Expand Down
Loading

0 comments on commit 54b1326

Please sign in to comment.