diff options
author | Andreas Kling <kling@serenityos.org> | 2021-02-20 13:02:14 +0100 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-02-20 13:25:04 +0100 |
commit | 716dc5bec92febc082d9078bd05e64ea724e9474 (patch) | |
tree | 89f586fb45827da891e46bde73cc452596ec738f /Userland/Libraries/LibGUI/Action.cpp | |
parent | 1bc17d28704b5ecccf3c46c5e63ba40c1918e7f6 (diff) | |
download | serenity-716dc5bec92febc082d9078bd05e64ea724e9474.zip |
LibGUI: Use delegating constructors in GUI::Action
Diffstat (limited to 'Userland/Libraries/LibGUI/Action.cpp')
-rw-r--r-- | Userland/Libraries/LibGUI/Action.cpp | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/Userland/Libraries/LibGUI/Action.cpp b/Userland/Libraries/LibGUI/Action.cpp index 9c129fafe9..848911849a 100644 --- a/Userland/Libraries/LibGUI/Action.cpp +++ b/Userland/Libraries/LibGUI/Action.cpp @@ -184,19 +184,12 @@ NonnullRefPtr<Action> Action::create_checkable(String text, const Shortcut& shor } Action::Action(String text, Function<void(Action&)> on_activation_callback, Core::Object* parent, bool checkable) - : Core::Object(parent) - , on_activation(move(on_activation_callback)) - , m_text(move(text)) - , m_checkable(checkable) + : Action(move(text), Shortcut {}, nullptr, move(on_activation_callback), parent, checkable) { } Action::Action(String text, RefPtr<Gfx::Bitmap> icon, Function<void(Action&)> on_activation_callback, Core::Object* parent, bool checkable) - : Core::Object(parent) - , on_activation(move(on_activation_callback)) - , m_text(move(text)) - , m_icon(move(icon)) - , m_checkable(checkable) + : Action(move(text), Shortcut {}, move(icon), move(on_activation_callback), parent, checkable) { } |