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/Demos | |
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/Demos')
-rw-r--r-- | Userland/Demos/ModelGallery/GalleryWidget.cpp | 2 | ||||
-rw-r--r-- | Userland/Demos/WidgetGallery/DemoWizardDialog.cpp | 4 | ||||
-rw-r--r-- | Userland/Demos/WidgetGallery/GalleryWidget.cpp | 12 |
3 files changed, 9 insertions, 9 deletions
diff --git a/Userland/Demos/ModelGallery/GalleryWidget.cpp b/Userland/Demos/ModelGallery/GalleryWidget.cpp index 1c4bace5d6..5808d82cd8 100644 --- a/Userland/Demos/ModelGallery/GalleryWidget.cpp +++ b/Userland/Demos/ModelGallery/GalleryWidget.cpp @@ -26,7 +26,7 @@ GalleryWidget::GalleryWidget() ErrorOr<void> GalleryWidget::load_basic_model_tab() { auto tab = TRY(m_tab_widget->try_add_tab<GUI::Widget>("Basic Model")); - tab->load_from_gml(basic_model_tab_gml); + TRY(tab->try_load_from_gml(basic_model_tab_gml)); m_basic_model = BasicModel::create(); m_basic_model_table = *tab->find_descendant_of_type_named<GUI::TableView>("model_table"); diff --git a/Userland/Demos/WidgetGallery/DemoWizardDialog.cpp b/Userland/Demos/WidgetGallery/DemoWizardDialog.cpp index 1b118e8acd..2edea7f382 100644 --- a/Userland/Demos/WidgetGallery/DemoWizardDialog.cpp +++ b/Userland/Demos/WidgetGallery/DemoWizardDialog.cpp @@ -28,7 +28,7 @@ DemoWizardDialog::DemoWizardDialog(GUI::Window* parent_window) "Installation location", "Choose where Demo Application is installed on your computer.") .release_value_but_fixme_should_propagate_errors(); - m_page_1->body_widget().load_from_gml(demo_wizard_page_1_gml); + m_page_1->body_widget().try_load_from_gml(demo_wizard_page_1_gml).release_value_but_fixme_should_propagate_errors(); m_page_1_location_text_box = m_page_1->body_widget().find_descendant_of_type_named<GUI::TextBox>("page_1_location_text_box"); m_page_1->on_next_page = [&]() { return m_page_2; @@ -39,7 +39,7 @@ DemoWizardDialog::DemoWizardDialog(GUI::Window* parent_window) "Installation in progress...", "Please wait. Do not turn off your computer.") .release_value_but_fixme_should_propagate_errors(); - m_page_2->body_widget().load_from_gml(demo_wizard_page_2_gml); + m_page_2->body_widget().try_load_from_gml(demo_wizard_page_2_gml).release_value_but_fixme_should_propagate_errors(); m_page_2_progressbar = m_page_2->body_widget().find_descendant_of_type_named<GUI::Progressbar>("page_2_progressbar"); m_page_2_timer = Core::Timer::try_create(this).release_value_but_fixme_should_propagate_errors(); m_page_2->on_page_enter = [&]() { diff --git a/Userland/Demos/WidgetGallery/GalleryWidget.cpp b/Userland/Demos/WidgetGallery/GalleryWidget.cpp index 45041e9340..02ce30f86b 100644 --- a/Userland/Demos/WidgetGallery/GalleryWidget.cpp +++ b/Userland/Demos/WidgetGallery/GalleryWidget.cpp @@ -32,12 +32,12 @@ GalleryWidget::GalleryWidget() { - load_from_gml(window_gml); + try_load_from_gml(window_gml).release_value_but_fixme_should_propagate_errors(); auto& tab_widget = *find_descendant_of_type_named<GUI::TabWidget>("tab_widget"); auto basics_tab = tab_widget.try_add_tab<GUI::Widget>("Basics").release_value_but_fixme_should_propagate_errors(); - basics_tab->load_from_gml(basics_tab_gml); + basics_tab->try_load_from_gml(basics_tab_gml).release_value_but_fixme_should_propagate_errors(); m_enabled_label = basics_tab->find_descendant_of_type_named<GUI::Label>("enabled_label"); m_label_frame = basics_tab->find_descendant_of_type_named<GUI::Frame>("label_frame"); @@ -170,7 +170,7 @@ GalleryWidget::GalleryWidget() }; auto sliders_tab = tab_widget.try_add_tab<GUI::Widget>("Sliders").release_value_but_fixme_should_propagate_errors(); - sliders_tab->load_from_gml(sliders_tab_gml); + sliders_tab->try_load_from_gml(sliders_tab_gml).release_value_but_fixme_should_propagate_errors(); m_vertical_progressbar_left = sliders_tab->find_descendant_of_type_named<GUI::VerticalProgressbar>("vertical_progressbar_left"); m_vertical_progressbar_left->set_value(0); @@ -231,7 +231,7 @@ GalleryWidget::GalleryWidget() }; auto wizards_tab = tab_widget.try_add_tab<GUI::Widget>("Wizards").release_value_but_fixme_should_propagate_errors(); - wizards_tab->load_from_gml(wizards_tab_gml); + wizards_tab->try_load_from_gml(wizards_tab_gml).release_value_but_fixme_should_propagate_errors(); m_wizard_button = wizards_tab->find_descendant_of_type_named<GUI::Button>("wizard_button"); m_wizard_output = wizards_tab->find_descendant_of_type_named<GUI::TextEditor>("wizard_output"); @@ -287,7 +287,7 @@ GalleryWidget::GalleryWidget() }; auto cursors_tab = tab_widget.try_add_tab<GUI::Widget>("Cursors").release_value_but_fixme_should_propagate_errors(); - cursors_tab->load_from_gml(cursors_tab_gml); + cursors_tab->try_load_from_gml(cursors_tab_gml).release_value_but_fixme_should_propagate_errors(); m_cursors_tableview = cursors_tab->find_descendant_of_type_named<GUI::TableView>("cursors_tableview"); m_cursors_tableview->set_highlight_selected_rows(true); @@ -310,7 +310,7 @@ GalleryWidget::GalleryWidget() }; auto icons_tab = tab_widget.try_add_tab<GUI::Widget>("Icons").release_value_but_fixme_should_propagate_errors(); - icons_tab->load_from_gml(icons_tab_gml); + icons_tab->try_load_from_gml(icons_tab_gml).release_value_but_fixme_should_propagate_errors(); m_icons_tableview = icons_tab->find_descendant_of_type_named<GUI::TableView>("icons_tableview"); m_icons_tableview->set_highlight_selected_rows(true); |