diff options
author | Linus Groh <mail@linusgroh.de> | 2022-12-06 01:12:49 +0000 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2022-12-06 08:54:33 +0100 |
commit | 57dc179b1fce5d4b7171311b04667debfe693095 (patch) | |
tree | a459d1aef92dc4e49bbf03b32621b1e7e30d4e64 /Userland/Applications/HexEditor | |
parent | 6e19ab2bbce0b113b628e6f8e9b5c0640053933e (diff) | |
download | serenity-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/Applications/HexEditor')
-rw-r--r-- | Userland/Applications/HexEditor/HexEditor.cpp | 10 | ||||
-rw-r--r-- | Userland/Applications/HexEditor/HexEditorWidget.cpp | 2 | ||||
-rw-r--r-- | Userland/Applications/HexEditor/ValueInspectorModel.h | 4 |
3 files changed, 8 insertions, 8 deletions
diff --git a/Userland/Applications/HexEditor/HexEditor.cpp b/Userland/Applications/HexEditor/HexEditor.cpp index 55ee1b2c8d..e1b23a7370 100644 --- a/Userland/Applications/HexEditor/HexEditor.cpp +++ b/Userland/Applications/HexEditor/HexEditor.cpp @@ -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; } diff --git a/Userland/Applications/HexEditor/HexEditorWidget.cpp b/Userland/Applications/HexEditor/HexEditorWidget.cpp index 097d14745a..9ab336836e 100644 --- a/Userland/Applications/HexEditor/HexEditorWidget.cpp +++ b/Userland/Applications/HexEditor/HexEditorWidget.cpp @@ -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) diff --git a/Userland/Applications/HexEditor/ValueInspectorModel.h b/Userland/Applications/HexEditor/ValueInspectorModel.h index 7acf4a6645..3f5a239a52 100644 --- a/Userland/Applications/HexEditor/ValueInspectorModel.h +++ b/Userland/Applications/HexEditor/ValueInspectorModel.h @@ -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()); } |