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/Applications/PixelPaint | |
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/Applications/PixelPaint')
6 files changed, 6 insertions, 10 deletions
diff --git a/Userland/Applications/PixelPaint/EditGuideDialog.cpp b/Userland/Applications/PixelPaint/EditGuideDialog.cpp index e5b82a2a3b..f9fee2d1d7 100644 --- a/Userland/Applications/PixelPaint/EditGuideDialog.cpp +++ b/Userland/Applications/PixelPaint/EditGuideDialog.cpp @@ -24,8 +24,7 @@ EditGuideDialog::EditGuideDialog(GUI::Window* parent_window, DeprecatedString co set_resizable(false); auto main_widget = set_main_widget<GUI::Widget>().release_value_but_fixme_should_propagate_errors(); - if (!main_widget->load_from_gml(edit_guide_dialog_gml)) - VERIFY_NOT_REACHED(); + main_widget->try_load_from_gml(edit_guide_dialog_gml).release_value_but_fixme_should_propagate_errors(); auto horizontal_radio = main_widget->find_descendant_of_type_named<GUI::RadioButton>("orientation_horizontal_radio"); auto vertical_radio = main_widget->find_descendant_of_type_named<GUI::RadioButton>("orientation_vertical_radio"); diff --git a/Userland/Applications/PixelPaint/FilterGallery.cpp b/Userland/Applications/PixelPaint/FilterGallery.cpp index 59aa45154f..8d66c3262b 100644 --- a/Userland/Applications/PixelPaint/FilterGallery.cpp +++ b/Userland/Applications/PixelPaint/FilterGallery.cpp @@ -22,8 +22,7 @@ FilterGallery::FilterGallery(GUI::Window* parent_window, ImageEditor* editor) set_resizable(true); auto main_widget = set_main_widget<GUI::Widget>().release_value_but_fixme_should_propagate_errors(); - if (!main_widget->load_from_gml(filter_gallery_gml)) - VERIFY_NOT_REACHED(); + main_widget->try_load_from_gml(filter_gallery_gml).release_value_but_fixme_should_propagate_errors(); m_filter_tree = main_widget->find_descendant_of_type_named<GUI::TreeView>("tree_view"); auto apply_button = main_widget->find_descendant_of_type_named<GUI::Button>("apply_button"); diff --git a/Userland/Applications/PixelPaint/Filters/Median.cpp b/Userland/Applications/PixelPaint/Filters/Median.cpp index f051e00469..ecd9bd58f4 100644 --- a/Userland/Applications/PixelPaint/Filters/Median.cpp +++ b/Userland/Applications/PixelPaint/Filters/Median.cpp @@ -46,7 +46,7 @@ RefPtr<GUI::Widget> Median::get_settings_widget() { if (!m_settings_widget) { m_settings_widget = GUI::Widget::construct(); - m_settings_widget->load_from_gml(median_settings_gml); + m_settings_widget->try_load_from_gml(median_settings_gml).release_value_but_fixme_should_propagate_errors(); m_settings_widget->find_descendant_of_type_named<GUI::SpinBox>("filter_radius")->on_change = [this](auto value) { m_filter_radius = value; update_preview(); diff --git a/Userland/Applications/PixelPaint/LevelsDialog.cpp b/Userland/Applications/PixelPaint/LevelsDialog.cpp index 833cca39b1..e8af129aea 100644 --- a/Userland/Applications/PixelPaint/LevelsDialog.cpp +++ b/Userland/Applications/PixelPaint/LevelsDialog.cpp @@ -19,8 +19,7 @@ LevelsDialog::LevelsDialog(GUI::Window* parent_window, ImageEditor* editor) set_icon(parent_window->icon()); auto main_widget = set_main_widget<GUI::Widget>().release_value_but_fixme_should_propagate_errors(); - if (!main_widget->load_from_gml(levels_dialog_gml)) - VERIFY_NOT_REACHED(); + main_widget->try_load_from_gml(levels_dialog_gml).release_value_but_fixme_should_propagate_errors(); resize(305, 202); set_resizable(false); diff --git a/Userland/Applications/PixelPaint/MainWidget.cpp b/Userland/Applications/PixelPaint/MainWidget.cpp index 5aa7f3bde7..f159ff1cc9 100644 --- a/Userland/Applications/PixelPaint/MainWidget.cpp +++ b/Userland/Applications/PixelPaint/MainWidget.cpp @@ -37,7 +37,7 @@ IconBag g_icon_bag; MainWidget::MainWidget() : Widget() { - load_from_gml(pixel_paint_window_gml); + try_load_from_gml(pixel_paint_window_gml).release_value_but_fixme_should_propagate_errors(); m_toolbox = find_descendant_of_type_named<PixelPaint::ToolboxWidget>("toolbox"); m_statusbar = *find_descendant_of_type_named<GUI::Statusbar>("statusbar"); diff --git a/Userland/Applications/PixelPaint/ResizeImageDialog.cpp b/Userland/Applications/PixelPaint/ResizeImageDialog.cpp index 0dddc0789f..bc6f4321c1 100644 --- a/Userland/Applications/PixelPaint/ResizeImageDialog.cpp +++ b/Userland/Applications/PixelPaint/ResizeImageDialog.cpp @@ -28,8 +28,7 @@ ResizeImageDialog::ResizeImageDialog(Gfx::IntSize suggested_size, GUI::Window* p set_icon(parent_window->icon()); auto main_widget = set_main_widget<GUI::Widget>().release_value_but_fixme_should_propagate_errors(); - if (!main_widget->load_from_gml(resize_image_dialog_gml)) - VERIFY_NOT_REACHED(); + main_widget->try_load_from_gml(resize_image_dialog_gml).release_value_but_fixme_should_propagate_errors(); auto width_spinbox = main_widget->find_descendant_of_type_named<GUI::SpinBox>("width_spinbox"); auto height_spinbox = main_widget->find_descendant_of_type_named<GUI::SpinBox>("height_spinbox"); |