mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 17:17:44 +00:00
LibGUI: Use delegating constructors in GUI::Action
This commit is contained in:
parent
1bc17d2870
commit
716dc5bec9
1 changed files with 2 additions and 9 deletions
|
@ -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)
|
||||
{
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue