From 9b30dea8894a92975b58030a8438e53c954c76e3 Mon Sep 17 00:00:00 2001 From: Tim Ledbetter Date: Mon, 18 Sep 2023 06:01:09 +0100 Subject: [PATCH] LibGUI: Remove `Action::try_create_checkable()` --- Userland/Libraries/LibGUI/Action.cpp | 5 ----- Userland/Libraries/LibGUI/Action.h | 2 -- 2 files changed, 7 deletions(-) diff --git a/Userland/Libraries/LibGUI/Action.cpp b/Userland/Libraries/LibGUI/Action.cpp index dcf7ca8c3b..b1d3a433dd 100644 --- a/Userland/Libraries/LibGUI/Action.cpp +++ b/Userland/Libraries/LibGUI/Action.cpp @@ -65,11 +65,6 @@ NonnullRefPtr Action::create_checkable(DeprecatedString text, Shortcut c return adopt_ref(*new Action(move(text), shortcut, Shortcut {}, move(icon), move(callback), parent, true)); } -ErrorOr> Action::try_create_checkable(DeprecatedString text, Shortcut const& shortcut, Function callback, Core::EventReceiver* parent) -{ - return adopt_nonnull_ref_or_enomem(new (nothrow) Action(move(text), shortcut, Shortcut {}, move(callback), parent, true)); -} - RefPtr Action::find_action_for_shortcut(Core::EventReceiver& object, Shortcut const& shortcut) { RefPtr found_action = nullptr; diff --git a/Userland/Libraries/LibGUI/Action.h b/Userland/Libraries/LibGUI/Action.h index de2f8e257a..558cf15a2e 100644 --- a/Userland/Libraries/LibGUI/Action.h +++ b/Userland/Libraries/LibGUI/Action.h @@ -77,8 +77,6 @@ public: static NonnullRefPtr create_checkable(DeprecatedString text, Shortcut const& shortcut, Function callback, Core::EventReceiver* parent = nullptr); static NonnullRefPtr create_checkable(DeprecatedString text, Shortcut const& shortcut, RefPtr icon, Function callback, Core::EventReceiver* parent = nullptr); - static ErrorOr> try_create_checkable(DeprecatedString text, Shortcut const& shortcut, Function callback, Core::EventReceiver* parent = nullptr); - static RefPtr find_action_for_shortcut(Core::EventReceiver& object, Shortcut const& shortcut); virtual ~Action() override;