mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-13 04:52:23 +00:00
HackStudio+LibGUI: Make fallible TabWidget::add_tab()
non-fallible
This commit is contained in:
parent
dc71ac4d2f
commit
499f459f0b
Notes:
sideshowbarker
2024-07-17 23:07:41 +09:00
Author: https://github.com/tcl3
Commit: 499f459f0b
Pull-request: https://github.com/SerenityOS/serenity/pull/21067
Reviewed-by: https://github.com/AtkinsSJ ✅
Reviewed-by: https://github.com/shannonbooth ✅
2 changed files with 3 additions and 4 deletions
|
@ -64,11 +64,10 @@ public:
|
|||
return *t;
|
||||
}
|
||||
|
||||
ErrorOr<void> add_tab(NonnullRefPtr<Widget> const& tab, String title)
|
||||
void add_tab(NonnullRefPtr<Widget> const& tab, String title)
|
||||
{
|
||||
tab->set_title(move(title));
|
||||
TRY(try_add_widget(*tab));
|
||||
return {};
|
||||
add_widget(*tab);
|
||||
}
|
||||
|
||||
void remove_tab(Widget& tab) { remove_widget(tab); }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue