diff options
author | Lucas CHOLLET <lucas.chollet@free.fr> | 2022-12-12 22:43:27 +0100 |
---|---|---|
committer | Linus Groh <mail@linusgroh.de> | 2022-12-15 17:36:57 +0000 |
commit | 664117564a02e0362be8f713a981b529c30bed1a (patch) | |
tree | 561335ef431357431556331ac8663afaa25e1159 /Userland | |
parent | 43ff500a80b4cd46c53792cd6ac190b2195dc7b0 (diff) | |
download | serenity-664117564a02e0362be8f713a981b529c30bed1a.zip |
LibGUI: Actually try something in `TabWidget::try_add_widget(Widget&)`
This function, while returning an `ErrorOr<void>`, didn't call failable
API.
Diffstat (limited to 'Userland')
-rw-r--r-- | Userland/Libraries/LibGUI/TabWidget.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Userland/Libraries/LibGUI/TabWidget.cpp b/Userland/Libraries/LibGUI/TabWidget.cpp index cfa1974912..05bb14c521 100644 --- a/Userland/Libraries/LibGUI/TabWidget.cpp +++ b/Userland/Libraries/LibGUI/TabWidget.cpp @@ -53,8 +53,8 @@ TabWidget::TabWidget() ErrorOr<void> TabWidget::try_add_widget(Widget& widget) { - m_tabs.append({ widget.title(), nullptr, &widget, false }); - add_child(widget); + TRY(m_tabs.try_append({ widget.title(), nullptr, &widget, false })); + TRY(try_add_child(widget)); update_focus_policy(); if (on_tab_count_change) on_tab_count_change(m_tabs.size()); |