1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 06:07:44 +00:00

Everywhere: Rename {Deprecated => Byte}String

This commit un-deprecates DeprecatedString, and repurposes it as a byte
string.
As the null state has already been removed, there are no other
particularly hairy blockers in repurposing this type as a byte string
(what it _really_ is).

This commit is auto-generated:
  $ xs=$(ack -l \bDeprecatedString\b\|deprecated_string AK Userland \
    Meta Ports Ladybird Tests Kernel)
  $ perl -pie 's/\bDeprecatedString\b/ByteString/g;
    s/deprecated_string/byte_string/g' $xs
  $ clang-format --style=file -i \
    $(git diff --name-only | grep \.cpp\|\.h)
  $ gn format $(git ls-files '*.gn' '*.gni')
This commit is contained in:
Ali Mohammad Pur 2023-12-16 17:49:34 +03:30 committed by Ali Mohammad Pur
parent 38d62563b3
commit 5e1499d104
1615 changed files with 10257 additions and 10257 deletions

View file

@ -7,7 +7,7 @@
*/
#include "TerminalWidget.h"
#include <AK/DeprecatedString.h>
#include <AK/ByteString.h>
#include <AK/LexicalPath.h>
#include <AK/StdLibExtras.h>
#include <AK/StringBuilder.h>
@ -982,7 +982,7 @@ int TerminalWidget::scroll_length() const
return m_scrollbar->step();
}
DeprecatedString TerminalWidget::selected_text() const
ByteString TerminalWidget::selected_text() const
{
StringBuilder builder;
@ -1008,7 +1008,7 @@ DeprecatedString TerminalWidget::selected_text() const
}
}
return builder.to_deprecated_string();
return builder.to_byte_string();
}
int TerminalWidget::first_selection_column_on_row(int row) const
@ -1133,7 +1133,7 @@ void TerminalWidget::context_menu_event(GUI::ContextMenuEvent& event)
auto af = Desktop::AppFile::get_for_app(LexicalPath::basename(handler));
if (!af->is_valid())
continue;
auto action = GUI::Action::create(DeprecatedString::formatted("&Open in {}", af->name()), af->icon().bitmap_for_size(16), [this, handler](auto&) {
auto action = GUI::Action::create(ByteString::formatted("&Open in {}", af->name()), af->icon().bitmap_for_size(16), [this, handler](auto&) {
Desktop::Launcher::open(m_context_menu_href, handler);
});
@ -1181,7 +1181,7 @@ void TerminalWidget::drop_event(GUI::DropEvent& event)
if (url.scheme() == "file")
send_non_user_input(url.serialize_path().bytes());
else
send_non_user_input(url.to_deprecated_string().bytes());
send_non_user_input(url.to_byte_string().bytes());
first = false;
}
@ -1360,7 +1360,7 @@ Optional<VT::CursorShape> TerminalWidget::parse_cursor_shape(StringView cursor_s
return {};
}
DeprecatedString TerminalWidget::stringify_cursor_shape(VT::CursorShape cursor_shape)
ByteString TerminalWidget::stringify_cursor_shape(VT::CursorShape cursor_shape)
{
switch (cursor_shape) {
case VT::CursorShape::Block: