summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Userland/Applications/Browser/BrowserWindow.cpp2
-rw-r--r--Userland/Applications/Spreadsheet/SpreadsheetWidget.cpp2
-rw-r--r--Userland/DevTools/HackStudio/HackStudioWidget.cpp2
-rw-r--r--Userland/DevTools/SQLStudio/ScriptEditor.cpp2
-rw-r--r--Userland/Libraries/LibGUI/TabWidget.cpp4
-rw-r--r--Userland/Libraries/LibGUI/TabWidget.h2
6 files changed, 7 insertions, 7 deletions
diff --git a/Userland/Applications/Browser/BrowserWindow.cpp b/Userland/Applications/Browser/BrowserWindow.cpp
index 32f502e064..9130c2759e 100644
--- a/Userland/Applications/Browser/BrowserWindow.cpp
+++ b/Userland/Applications/Browser/BrowserWindow.cpp
@@ -572,7 +572,7 @@ void BrowserWindow::create_new_tab(URL url, bool activate)
m_tab_widget->set_bar_visible(!is_fullscreen() && m_tab_widget->children().size() > 1);
new_tab.on_title_change = [this, &new_tab](auto& title) {
- m_tab_widget->set_tab_title(new_tab, title);
+ m_tab_widget->set_tab_title(new_tab, String::from_deprecated_string(title).release_value_but_fixme_should_propagate_errors());
if (m_tab_widget->active_widget() == &new_tab)
set_window_title_for_tab(new_tab);
};
diff --git a/Userland/Applications/Spreadsheet/SpreadsheetWidget.cpp b/Userland/Applications/Spreadsheet/SpreadsheetWidget.cpp
index 599cbd705a..a663d68633 100644
--- a/Userland/Applications/Spreadsheet/SpreadsheetWidget.cpp
+++ b/Userland/Applications/Spreadsheet/SpreadsheetWidget.cpp
@@ -104,7 +104,7 @@ SpreadsheetWidget::SpreadsheetWidget(GUI::Window& parent_window, Vector<NonnullR
if (GUI::InputBox::show(window(), new_name, DeprecatedString::formatted("New name for '{}'", sheet.name()), "Rename sheet"sv) == GUI::Dialog::ExecResult::OK) {
sheet.set_name(new_name);
sheet.update();
- m_tab_widget->set_tab_title(static_cast<GUI::Widget&>(*m_tab_context_menu_sheet_view), new_name);
+ m_tab_widget->set_tab_title(static_cast<GUI::Widget&>(*m_tab_context_menu_sheet_view), String::from_deprecated_string(new_name).release_value_but_fixme_should_propagate_errors());
}
});
m_tab_context_menu->add_action(*m_rename_action);
diff --git a/Userland/DevTools/HackStudio/HackStudioWidget.cpp b/Userland/DevTools/HackStudio/HackStudioWidget.cpp
index 77c99feb56..e631627a8d 100644
--- a/Userland/DevTools/HackStudio/HackStudioWidget.cpp
+++ b/Userland/DevTools/HackStudio/HackStudioWidget.cpp
@@ -1714,7 +1714,7 @@ void HackStudioWidget::update_window_title()
void HackStudioWidget::update_current_editor_title()
{
- current_editor_tab_widget().set_tab_title(current_editor_wrapper(), current_editor_wrapper().filename_title());
+ current_editor_tab_widget().set_tab_title(current_editor_wrapper(), String::from_deprecated_string(current_editor_wrapper().filename_title()).release_value_but_fixme_should_propagate_errors());
}
void HackStudioWidget::on_cursor_change()
diff --git a/Userland/DevTools/SQLStudio/ScriptEditor.cpp b/Userland/DevTools/SQLStudio/ScriptEditor.cpp
index 2cf378e020..14946f9ed0 100644
--- a/Userland/DevTools/SQLStudio/ScriptEditor.cpp
+++ b/Userland/DevTools/SQLStudio/ScriptEditor.cpp
@@ -72,7 +72,7 @@ ErrorOr<bool> ScriptEditor::save_as()
auto parent = static_cast<GUI::TabWidget*>(parent_widget());
if (parent)
- parent->set_tab_title(*this, lexical_path.title());
+ parent->set_tab_title(*this, String::from_deprecated_string(lexical_path.title()).release_value_but_fixme_should_propagate_errors());
document().set_unmodified();
return true;
diff --git a/Userland/Libraries/LibGUI/TabWidget.cpp b/Userland/Libraries/LibGUI/TabWidget.cpp
index dce58a0093..6cc20289af 100644
--- a/Userland/Libraries/LibGUI/TabWidget.cpp
+++ b/Userland/Libraries/LibGUI/TabWidget.cpp
@@ -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;
diff --git a/Userland/Libraries/LibGUI/TabWidget.h b/Userland/Libraries/LibGUI/TabWidget.h
index ce3aa75a9a..2abd3dfb45 100644
--- a/Userland/Libraries/LibGUI/TabWidget.h
+++ b/Userland/Libraries/LibGUI/TabWidget.h
@@ -83,7 +83,7 @@ public:
void remove_tab(Widget& tab) { remove_widget(tab); }
void remove_all_tabs_except(Widget& tab);
- void set_tab_title(Widget& tab, StringView title);
+ void set_tab_title(Widget& tab, String title);
void set_tab_icon(Widget& tab, Gfx::Bitmap const*);
bool is_tab_modified(Widget& tab);