summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibGUI/ListView.cpp
diff options
context:
space:
mode:
authorLinus Groh <mail@linusgroh.de>2022-12-06 01:12:49 +0000
committerAndreas Kling <kling@serenityos.org>2022-12-06 08:54:33 +0100
commit57dc179b1fce5d4b7171311b04667debfe693095 (patch)
treea459d1aef92dc4e49bbf03b32621b1e7e30d4e64 /Userland/Libraries/LibGUI/ListView.cpp
parent6e19ab2bbce0b113b628e6f8e9b5c0640053933e (diff)
downloadserenity-57dc179b1fce5d4b7171311b04667debfe693095.zip
Everywhere: Rename to_{string => deprecated_string}() where applicable
This will make it easier to support both string types at the same time while we convert code, and tracking down remaining uses. One big exception is Value::to_string() in LibJS, where the name is dictated by the ToString AO.
Diffstat (limited to 'Userland/Libraries/LibGUI/ListView.cpp')
-rw-r--r--Userland/Libraries/LibGUI/ListView.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/Userland/Libraries/LibGUI/ListView.cpp b/Userland/Libraries/LibGUI/ListView.cpp
index cf0f4ec514..d20f8ef5d4 100644
--- a/Userland/Libraries/LibGUI/ListView.cpp
+++ b/Userland/Libraries/LibGUI/ListView.cpp
@@ -42,7 +42,7 @@ void ListView::update_content_size()
int content_width = 0;
for (int row = 0, row_count = model()->row_count(); row < row_count; ++row) {
auto text = model()->index(row, m_model_column).data();
- content_width = max(content_width, font().width(text.to_string()) + horizontal_padding() * 2);
+ content_width = max(content_width, font().width(text.to_deprecated_string()) + horizontal_padding() * 2);
}
m_max_item_width = content_width;
content_width = max(content_width, widget_inner_rect().width());
@@ -133,7 +133,7 @@ void ListView::paint_list_item(Painter& painter, int row_index, int painted_item
text_rect.translate_by(horizontal_padding(), 0);
text_rect.set_width(text_rect.width() - horizontal_padding() * 2);
auto text_alignment = index.data(ModelRole::TextAlignment).to_text_alignment(Gfx::TextAlignment::CenterLeft);
- draw_item_text(painter, index, is_selected_row, text_rect, data.to_string(), font, text_alignment, Gfx::TextElision::None);
+ draw_item_text(painter, index, is_selected_row, text_rect, data.to_deprecated_string(), font, text_alignment, Gfx::TextElision::None);
}
}