mirror of
https://github.com/RGBCube/serenity
synced 2025-06-01 09:28:13 +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
|
@ -21,8 +21,10 @@ namespace HackStudio {
|
|||
class EditorWrapper;
|
||||
|
||||
class Editor final : public GUI::TextEditor {
|
||||
C_OBJECT(Editor)
|
||||
C_OBJECT_ABSTRACT(Editor)
|
||||
public:
|
||||
static ErrorOr<NonnullRefPtr<Editor>> try_create();
|
||||
|
||||
virtual ~Editor() override;
|
||||
|
||||
Function<void()> on_focus;
|
||||
|
@ -115,8 +117,8 @@ private:
|
|||
RefPtr<GUI::Action> m_move_execution_to_line_action;
|
||||
|
||||
OwnPtr<LanguageClient> m_language_client;
|
||||
void initialize_documentation_tooltip();
|
||||
void initialize_parameters_hint_tooltip();
|
||||
ErrorOr<void> initialize_documentation_tooltip();
|
||||
ErrorOr<void> initialize_parameters_hint_tooltip();
|
||||
};
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue