diff options
author | Karol Kosek <krkk@serenityos.org> | 2023-05-09 17:03:03 +0200 |
---|---|---|
committer | Sam Atkins <atkinssj@gmail.com> | 2023-05-16 12:57:34 +0100 |
commit | 23ac52bc80fb3d82542664a27325a9a7e7b474e0 (patch) | |
tree | 4ed92e4f13a602d92f293cb595aecc9cf25728e3 | |
parent | 477ee34215de0a7265e2206816bf3251aa3b63d0 (diff) | |
download | serenity-23ac52bc80fb3d82542664a27325a9a7e7b474e0.zip |
GMLPlayground: Use `try_make` for syntax highlighting and autocomplete
-rw-r--r-- | Userland/DevTools/GMLPlayground/MainWidget.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Userland/DevTools/GMLPlayground/MainWidget.cpp b/Userland/DevTools/GMLPlayground/MainWidget.cpp index c9fc0c2df4..ccd6411569 100644 --- a/Userland/DevTools/GMLPlayground/MainWidget.cpp +++ b/Userland/DevTools/GMLPlayground/MainWidget.cpp @@ -77,8 +77,8 @@ ErrorOr<NonnullRefPtr<MainWidget>> MainWidget::try_create(GUI::Icon const& icon) main_widget->m_preview = main_widget->m_preview_frame_widget; - main_widget->m_editor->set_syntax_highlighter(make<GUI::GML::SyntaxHighlighter>()); - main_widget->m_editor->set_autocomplete_provider(make<GUI::GML::AutocompleteProvider>()); + main_widget->m_editor->set_syntax_highlighter(TRY(try_make<GUI::GML::SyntaxHighlighter>())); + main_widget->m_editor->set_autocomplete_provider(TRY(try_make<GUI::GML::AutocompleteProvider>())); main_widget->m_editor->set_should_autocomplete_automatically(true); main_widget->m_editor->set_automatic_indentation_enabled(true); main_widget->m_editor->set_ruler_visible(true); |