mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-10 13:00:29 +03:00
LibGUI: Store Tab titles using the new string class
This commit is contained in:
parent
446c600d09
commit
4f08a05a3b
Notes:
sideshowbarker
2024-07-17 18:06:52 +09:00
Author: https://github.com/krkk Commit: https://github.com/SerenityOS/serenity/commit/4f08a05a3b Pull-request: https://github.com/SerenityOS/serenity/pull/17800 Reviewed-by: https://github.com/AtkinsSJ Reviewed-by: https://github.com/awesomekling
@ -53,7 +53,7 @@ TabWidget::TabWidget()
|
||||
|
||||
ErrorOr<void> TabWidget::try_add_widget(Widget& widget)
|
||||
{
|
||||
TRY(m_tabs.try_append({ widget.title().to_deprecated_string(), nullptr, &widget, false }));
|
||||
TRY(m_tabs.try_append({ widget.title(), nullptr, &widget, false }));
|
||||
TRY(try_add_child(widget));
|
||||
update_focus_policy();
|
||||
if (on_tab_count_change)
|
||||
@ -596,7 +596,7 @@ void TabWidget::set_tab_title(Widget& tab, StringView title)
|
||||
for (auto& t : m_tabs) {
|
||||
if (t.widget == &tab) {
|
||||
if (t.title != title) {
|
||||
t.title = title;
|
||||
t.title = String::from_utf8(title).release_value_but_fixme_should_propagate_errors();
|
||||
update();
|
||||
}
|
||||
return;
|
||||
|
@ -147,7 +147,7 @@ private:
|
||||
|
||||
struct TabData {
|
||||
int width(Gfx::Font const&) const;
|
||||
DeprecatedString title;
|
||||
String title;
|
||||
RefPtr<Gfx::Bitmap const> icon;
|
||||
Widget* widget { nullptr };
|
||||
bool modified { false };
|
||||
|
Loading…
Reference in New Issue
Block a user