summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibGUI/Action.cpp
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2021-02-20 13:02:14 +0100
committerAndreas Kling <kling@serenityos.org>2021-02-20 13:25:04 +0100
commit716dc5bec92febc082d9078bd05e64ea724e9474 (patch)
tree89f586fb45827da891e46bde73cc452596ec738f /Userland/Libraries/LibGUI/Action.cpp
parent1bc17d28704b5ecccf3c46c5e63ba40c1918e7f6 (diff)
downloadserenity-716dc5bec92febc082d9078bd05e64ea724e9474.zip
LibGUI: Use delegating constructors in GUI::Action
Diffstat (limited to 'Userland/Libraries/LibGUI/Action.cpp')
-rw-r--r--Userland/Libraries/LibGUI/Action.cpp11
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)
{
}