1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 05:37:43 +00:00

LibGUI+Userland: Make GML unregistered_child_handler fallible

This commit is contained in:
Sam Atkins 2022-12-30 11:33:58 +00:00 committed by Tim Flynn
parent 2069a5a2a0
commit fa98034ff7
6 changed files with 16 additions and 16 deletions

View file

@ -121,8 +121,8 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
editor->on_change = [&] {
preview->remove_all_children();
preview->load_from_gml(editor->text(), [](const DeprecatedString& class_name) -> RefPtr<Core::Object> {
return UnregisteredWidget::construct(class_name);
preview->load_from_gml(editor->text(), [](DeprecatedString const& class_name) -> ErrorOr<NonnullRefPtr<Core::Object>> {
return UnregisteredWidget::try_create(class_name);
});
};