mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 01:07:36 +00:00
Userland: Make GUI::Window
construction non-fallible
This commit is contained in:
parent
b6b2c6f3e2
commit
0d7b13edac
55 changed files with 60 additions and 60 deletions
|
@ -73,7 +73,7 @@ ErrorOr<NonnullRefPtr<MainWidget>> MainWidget::try_create(GUI::Icon const& icon)
|
|||
main_widget->m_preview_frame_widget = main_widget->find_descendant_of_type_named<GUI::Frame>("preview_frame");
|
||||
main_widget->m_statusbar = main_widget->find_descendant_of_type_named<GUI::Statusbar>("statusbar");
|
||||
|
||||
main_widget->m_preview_window = TRY(GUI::Window::try_create(main_widget));
|
||||
main_widget->m_preview_window = GUI::Window::construct(main_widget);
|
||||
main_widget->m_preview_window->set_title("Preview - GML Playground");
|
||||
main_widget->m_preview_window->set_icon(icon.bitmap_for_size(16));
|
||||
main_widget->m_preview_window_widget = TRY(main_widget->m_preview_window->set_main_widget<GUI::Widget>());
|
||||
|
|
|
@ -40,7 +40,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
|
|||
args_parser.parse(arguments);
|
||||
|
||||
auto app_icon = TRY(GUI::Icon::try_create_default_icon("app-gml-playground"sv));
|
||||
auto window = TRY(GUI::Window::try_create());
|
||||
auto window = GUI::Window::construct();
|
||||
window->set_title("GML Playground");
|
||||
window->set_icon(app_icon.bitmap_for_size(16));
|
||||
window->resize(800, 600);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue