diff --git a/Userland/Libraries/LibGUI/Widget.cpp b/Userland/Libraries/LibGUI/Widget.cpp index e201fb7f3b..3dba85bd23 100644 --- a/Userland/Libraries/LibGUI/Widget.cpp +++ b/Userland/Libraries/LibGUI/Widget.cpp @@ -983,9 +983,9 @@ Gfx::IntRect Widget::content_rect() const return rect; } -void Widget::set_tooltip(const StringView& tooltip) +void Widget::set_tooltip(String tooltip) { - m_tooltip = tooltip; + m_tooltip = move(tooltip); if (Application::the()->tooltip_source_widget() == this) show_or_hide_tooltip(); } diff --git a/Userland/Libraries/LibGUI/Widget.h b/Userland/Libraries/LibGUI/Widget.h index 45a2411fd2..8cb070cc7d 100644 --- a/Userland/Libraries/LibGUI/Widget.h +++ b/Userland/Libraries/LibGUI/Widget.h @@ -140,7 +140,7 @@ public: bool has_tooltip() const { return !m_tooltip.is_empty(); } String tooltip() const { return m_tooltip; } - void set_tooltip(const StringView&); + void set_tooltip(String); bool is_enabled() const { return m_enabled; } void set_enabled(bool);