mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 13:38:11 +00:00
HackStudio: Propagate errors using try_set_main_widget
The documentation tooltip and parameters hint tooltip initialization functions are now fallible and now call try_set_main_widget instead of set_main_widget. They are only called by Editor's new custom try_create function.
This commit is contained in:
parent
4c0b8a70e2
commit
d4484f4de3
3 changed files with 21 additions and 10 deletions
|
@ -30,7 +30,8 @@ EditorWrapper::EditorWrapper()
|
|||
m_filename_label->set_text_alignment(Gfx::TextAlignment::CenterLeft);
|
||||
m_filename_label->set_fixed_height(14);
|
||||
|
||||
m_editor = add<Editor>();
|
||||
// FIXME: Propagate errors instead of giving up
|
||||
m_editor = MUST(try_add<Editor>());
|
||||
m_editor->set_ruler_visible(true);
|
||||
m_editor->set_automatic_indentation_enabled(true);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue