LibGUI: Tweak AbstractButton and subclass constructors

Taking a "const StringView&" for the initial text does not achieve
anything useful. Just take a "String" and move it into storage.
This commit is contained in:
Andreas Kling 2020-12-28 13:18:10 +01:00
parent 476911e1f9
commit cd9ad6a05e
Notes: sideshowbarker 2024-07-19 00:29:58 +09:00
9 changed files with 25 additions and 21 deletions
Libraries/LibGUI

View file

@ -35,8 +35,8 @@
namespace GUI {
Button::Button(const StringView& text)
: AbstractButton(text)
Button::Button(String text)
: AbstractButton(move(text))
{
set_focus_policy(GUI::FocusPolicy::StrongFocus);
}