1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 12:47:35 +00:00

LibGUI: Remove Menubar::try_add_menu()

And fall back to the infallible add_menu().
This commit is contained in:
Andreas Kling 2023-08-14 10:22:49 +02:00
parent 94cd272ac0
commit 5300896095
4 changed files with 8 additions and 17 deletions

View file

@ -22,9 +22,8 @@ class Menubar : public Core::EventReceiver {
public:
virtual ~Menubar() override = default;
ErrorOr<void> try_add_menu(Badge<Window>, NonnullRefPtr<Menu>);
ErrorOr<NonnullRefPtr<Menu>> try_add_menu(Badge<Window>, String name);
Menu& add_menu(Badge<Window>, String name);
void add_menu(Badge<Window>, NonnullRefPtr<Menu>);
[[nodiscard]] NonnullRefPtr<Menu> add_menu(Badge<Window>, String name);
void for_each_menu(Function<IterationDecision(Menu&)>);