diff options
author | Sam Atkins <atkinssj@serenityos.org> | 2023-01-07 12:33:53 +0000 |
---|---|---|
committer | Linus Groh <mail@linusgroh.de> | 2023-01-07 14:39:30 +0100 |
commit | 54b1326165dd97ae3dab82360d0e7b029650004d (patch) | |
tree | bf0761a91ae3717da5e59356108e6d3260fd9137 /Userland/Games/Minesweeper | |
parent | 703da34947b147763815da9fee89ce2ba05372b7 (diff) | |
download | serenity-54b1326165dd97ae3dab82360d0e7b029650004d.zip |
Userland: Replace all uses of `load_from_gml` with `try_load_from_gml`
MOAR FIXMES! ;^)
Diffstat (limited to 'Userland/Games/Minesweeper')
-rw-r--r-- | Userland/Games/Minesweeper/CustomGameDialog.cpp | 3 | ||||
-rw-r--r-- | Userland/Games/Minesweeper/main.cpp | 2 |
2 files changed, 2 insertions, 3 deletions
diff --git a/Userland/Games/Minesweeper/CustomGameDialog.cpp b/Userland/Games/Minesweeper/CustomGameDialog.cpp index 081b7eb3ce..f8c99fff0d 100644 --- a/Userland/Games/Minesweeper/CustomGameDialog.cpp +++ b/Userland/Games/Minesweeper/CustomGameDialog.cpp @@ -46,8 +46,7 @@ CustomGameDialog::CustomGameDialog(Window* parent_window) set_title("Custom game"); auto main_widget = set_main_widget<GUI::Widget>().release_value_but_fixme_should_propagate_errors(); - if (!main_widget->load_from_gml(minesweeper_custom_game_window_gml)) - VERIFY_NOT_REACHED(); + main_widget->try_load_from_gml(minesweeper_custom_game_window_gml).release_value_but_fixme_should_propagate_errors(); m_columns_spinbox = *main_widget->find_descendant_of_type_named<GUI::SpinBox>("columns_spinbox"); m_rows_spinbox = *main_widget->find_descendant_of_type_named<GUI::SpinBox>("rows_spinbox"); diff --git a/Userland/Games/Minesweeper/main.cpp b/Userland/Games/Minesweeper/main.cpp index 49e1062f77..360833a187 100644 --- a/Userland/Games/Minesweeper/main.cpp +++ b/Userland/Games/Minesweeper/main.cpp @@ -50,7 +50,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments) window->resize(139, 177); auto widget = TRY(window->set_main_widget<GUI::Widget>()); - widget->load_from_gml(minesweeper_window_gml); + TRY(widget->try_load_from_gml(minesweeper_window_gml)); auto& separator = *widget->find_descendant_of_type_named<GUI::HorizontalSeparator>("separator"); auto& container = *widget->find_descendant_of_type_named<GUI::Widget>("container"); |