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:
parent
2069a5a2a0
commit
fa98034ff7
6 changed files with 16 additions and 16 deletions
|
@ -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);
|
||||
});
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue