mirror of
https://github.com/RGBCube/serenity
synced 2025-07-28 19:07:35 +00:00
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.
This commit is contained in:
parent
6e19ab2bbc
commit
57dc179b1f
597 changed files with 1973 additions and 1972 deletions
|
@ -172,7 +172,7 @@ bool HexEditor::copy_selected_hex_to_clipboard()
|
|||
for (size_t i = m_selection_start; i < m_selection_end; i++)
|
||||
output_string_builder.appendff("{:02X} ", m_document->get(i).value);
|
||||
|
||||
GUI::Clipboard::the().set_plain_text(output_string_builder.to_string());
|
||||
GUI::Clipboard::the().set_plain_text(output_string_builder.to_deprecated_string());
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -185,7 +185,7 @@ bool HexEditor::copy_selected_text_to_clipboard()
|
|||
for (size_t i = m_selection_start; i < m_selection_end; i++)
|
||||
output_string_builder.append(isprint(m_document->get(i).value) ? m_document->get(i).value : '.');
|
||||
|
||||
GUI::Clipboard::the().set_plain_text(output_string_builder.to_string());
|
||||
GUI::Clipboard::the().set_plain_text(output_string_builder.to_deprecated_string());
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -208,7 +208,7 @@ bool HexEditor::copy_selected_hex_to_clipboard_as_c_code()
|
|||
}
|
||||
output_string_builder.append("\n};\n"sv);
|
||||
|
||||
GUI::Clipboard::the().set_plain_text(output_string_builder.to_string());
|
||||
GUI::Clipboard::the().set_plain_text(output_string_builder.to_deprecated_string());
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -768,7 +768,7 @@ Vector<Match> HexEditor::find_all(ByteBuffer& needle, size_t start)
|
|||
}
|
||||
}
|
||||
if (found) {
|
||||
matches.append({ i, DeprecatedString::formatted("{}", StringView { needle }.to_string().characters()) });
|
||||
matches.append({ i, DeprecatedString::formatted("{}", StringView { needle }.to_deprecated_string().characters()) });
|
||||
i += needle.size() - 1;
|
||||
}
|
||||
}
|
||||
|
@ -803,7 +803,7 @@ Vector<Match> HexEditor::find_all_strings(size_t min_length)
|
|||
builder.append(c);
|
||||
} else {
|
||||
if (builder.length() >= min_length)
|
||||
matches.append({ offset, builder.to_string() });
|
||||
matches.append({ offset, builder.to_deprecated_string() });
|
||||
builder.clear();
|
||||
found_string = false;
|
||||
}
|
||||
|
|
|
@ -520,7 +520,7 @@ void HexEditorWidget::update_title()
|
|||
else
|
||||
builder.append(m_path);
|
||||
builder.append("[*] - Hex Editor"sv);
|
||||
window()->set_title(builder.to_string());
|
||||
window()->set_title(builder.to_deprecated_string());
|
||||
}
|
||||
|
||||
void HexEditorWidget::open_file(NonnullRefPtr<Core::File> file)
|
||||
|
|
|
@ -71,7 +71,7 @@ public:
|
|||
VERIFY_NOT_REACHED();
|
||||
}
|
||||
|
||||
DeprecatedString inspector_value_type_to_string(ValueType type) const
|
||||
DeprecatedString inspector_value_type_to_deprecated_string(ValueType type) const
|
||||
{
|
||||
switch (type) {
|
||||
case SignedByte:
|
||||
|
@ -112,7 +112,7 @@ public:
|
|||
if (role == GUI::ModelRole::Display) {
|
||||
switch (index.column()) {
|
||||
case Column::Type:
|
||||
return inspector_value_type_to_string(static_cast<ValueType>(index.row()));
|
||||
return inspector_value_type_to_deprecated_string(static_cast<ValueType>(index.row()));
|
||||
case Column::Value:
|
||||
return m_values.at(index.row());
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue