diff --git a/Userland/DevTools/HackStudio/HackStudioWidget.cpp b/Userland/DevTools/HackStudio/HackStudioWidget.cpp index 4551f4f6489..db322fc706a 100644 --- a/Userland/DevTools/HackStudio/HackStudioWidget.cpp +++ b/Userland/DevTools/HackStudio/HackStudioWidget.cpp @@ -1346,7 +1346,7 @@ ErrorOr HackStudioWidget::create_action_tab(GUI::Widget& parent) m_todo_entries_widget = m_action_tab_widget->add_tab("TODO"_string); m_terminal_wrapper = m_action_tab_widget->add_tab("Console"_string, false); auto debug_info_widget = TRY(DebugInfoWidget::create()); - TRY(m_action_tab_widget->add_tab(debug_info_widget, "Debug"_string)); + m_action_tab_widget->add_tab(debug_info_widget, "Debug"_string); m_debug_info_widget = debug_info_widget; m_debug_info_widget->on_backtrace_frame_selection = [this](Debug::DebugInfo::SourcePosition const& source_position) { diff --git a/Userland/Libraries/LibGUI/TabWidget.h b/Userland/Libraries/LibGUI/TabWidget.h index e2968ef9575..356a2322165 100644 --- a/Userland/Libraries/LibGUI/TabWidget.h +++ b/Userland/Libraries/LibGUI/TabWidget.h @@ -64,11 +64,10 @@ public: return *t; } - ErrorOr add_tab(NonnullRefPtr const& tab, String title) + void add_tab(NonnullRefPtr 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); }