mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 18:47:34 +00:00
LibGUI+Userland: Port TabWidget set_tab_title to new string
This commit is contained in:
parent
4f08a05a3b
commit
66402b0666
6 changed files with 7 additions and 7 deletions
|
@ -591,12 +591,12 @@ Optional<size_t> TabWidget::active_tab_index() const
|
|||
return {};
|
||||
}
|
||||
|
||||
void TabWidget::set_tab_title(Widget& tab, StringView title)
|
||||
void TabWidget::set_tab_title(Widget& tab, String title)
|
||||
{
|
||||
for (auto& t : m_tabs) {
|
||||
if (t.widget == &tab) {
|
||||
if (t.title != title) {
|
||||
t.title = String::from_utf8(title).release_value_but_fixme_should_propagate_errors();
|
||||
t.title = move(title);
|
||||
update();
|
||||
}
|
||||
return;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue