1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 12:28:12 +00:00

AK+Everywhere: Rename String to DeprecatedString

We have a new, improved string type coming up in AK (OOM aware, no null
state), and while it's going to use UTF-8, the name UTF8String is a
mouthful - so let's free up the String name by renaming the existing
class.
Making the old one have an annoying name will hopefully also help with
quick adoption :^)
This commit is contained in:
Linus Groh 2022-12-04 18:02:33 +00:00 committed by Andreas Kling
parent f74251606d
commit 6e19ab2bbc
2006 changed files with 11635 additions and 11636 deletions

View file

@ -33,7 +33,7 @@ int RemoteObjectPropertyModel::row_count(const GUI::ModelIndex& index) const
}
}
String RemoteObjectPropertyModel::column_name(int column) const
DeprecatedString RemoteObjectPropertyModel::column_name(int column) const
{
switch (column) {
case Column::Name:
@ -57,9 +57,9 @@ GUI::Variant RemoteObjectPropertyModel::data(const GUI::ModelIndex& index, GUI::
case Column::Value: {
auto data = path->resolve(m_object.json);
if (data.is_array())
return String::formatted("<Array with {} element{}", data.as_array().size(), data.as_array().size() == 1 ? ">" : "s>");
return DeprecatedString::formatted("<Array with {} element{}", data.as_array().size(), data.as_array().size() == 1 ? ">" : "s>");
if (data.is_object())
return String::formatted("<Object with {} entr{}", data.as_object().size(), data.as_object().size() == 1 ? "y>" : "ies>");
return DeprecatedString::formatted("<Object with {} entr{}", data.as_object().size(), data.as_object().size() == 1 ? "y>" : "ies>");
return data;
}
}
@ -90,7 +90,7 @@ GUI::ModelIndex RemoteObjectPropertyModel::index(int row, int column, const GUI:
path->extend(parent_path);
int row_index = n;
if (value.is_object()) {
String property_name;
DeprecatedString property_name;
auto& object = value.as_object();
object.for_each_member([&](auto& name, auto&) {
if (row_index > 0) {