mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 21:27:45 +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:
parent
38d62563b3
commit
5e1499d104
1615 changed files with 10257 additions and 10257 deletions
|
@ -13,7 +13,7 @@
|
|||
#include <LibVT/XtermColors.h>
|
||||
|
||||
#ifndef KERNEL
|
||||
# include <AK/DeprecatedString.h>
|
||||
# include <AK/ByteString.h>
|
||||
#endif
|
||||
|
||||
namespace VT {
|
||||
|
@ -37,8 +37,8 @@ struct Attribute {
|
|||
Color background_color { default_background_color };
|
||||
|
||||
#ifndef KERNEL
|
||||
DeprecatedString href;
|
||||
Optional<DeprecatedString> href_id;
|
||||
ByteString href;
|
||||
Optional<ByteString> href_id;
|
||||
#endif
|
||||
|
||||
enum class Flags : u8 {
|
||||
|
|
|
@ -1264,7 +1264,7 @@ void Terminal::execute_osc_sequence(OscParameters parameters, u8 last_byte)
|
|||
// FIXME: the split breaks titles containing semicolons.
|
||||
// Should we expose the raw OSC string from the parser? Or join by semicolon?
|
||||
#ifndef KERNEL
|
||||
m_current_window_title = stringview_ify(1).to_deprecated_string();
|
||||
m_current_window_title = stringview_ify(1).to_byte_string();
|
||||
m_client.set_window_title(m_current_window_title);
|
||||
#endif
|
||||
}
|
||||
|
@ -1280,7 +1280,7 @@ void Terminal::execute_osc_sequence(OscParameters parameters, u8 last_byte)
|
|||
} else {
|
||||
m_current_state.attribute.href = stringview_ify(2);
|
||||
// FIXME: Respect the provided ID
|
||||
m_current_state.attribute.href_id = DeprecatedString::number(m_next_href_id++);
|
||||
m_current_state.attribute.href_id = ByteString::number(m_next_href_id++);
|
||||
}
|
||||
#endif
|
||||
break;
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
#include <LibVT/Position.h>
|
||||
|
||||
#ifndef KERNEL
|
||||
# include <AK/DeprecatedString.h>
|
||||
# include <AK/ByteString.h>
|
||||
# include <LibVT/Attribute.h>
|
||||
# include <LibVT/Line.h>
|
||||
#else
|
||||
|
@ -435,8 +435,8 @@ protected:
|
|||
Attribute m_saved_attribute;
|
||||
|
||||
#ifndef KERNEL
|
||||
DeprecatedString m_current_window_title;
|
||||
Vector<DeprecatedString> m_title_stack;
|
||||
ByteString m_current_window_title;
|
||||
Vector<ByteString> m_title_stack;
|
||||
#endif
|
||||
|
||||
#ifndef KERNEL
|
||||
|
|
|
@ -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:
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
#include <AK/DeprecatedString.h>
|
||||
#include <AK/ByteString.h>
|
||||
#include <LibCore/ElapsedTimer.h>
|
||||
#include <LibCore/Notifier.h>
|
||||
#include <LibCore/Timer.h>
|
||||
|
@ -57,7 +57,7 @@ public:
|
|||
|
||||
bool has_selection() const;
|
||||
bool selection_contains(const VT::Position&) const;
|
||||
DeprecatedString selected_text() const;
|
||||
ByteString selected_text() const;
|
||||
VT::Range normalized_selection() const { return m_selection.normalized(); }
|
||||
void set_selection(const VT::Range& selection);
|
||||
VT::Position buffer_position_at(Gfx::IntPoint) const;
|
||||
|
@ -103,7 +103,7 @@ public:
|
|||
virtual void set_cursor_shape(CursorShape) override;
|
||||
|
||||
static Optional<VT::CursorShape> parse_cursor_shape(StringView);
|
||||
static DeprecatedString stringify_cursor_shape(VT::CursorShape);
|
||||
static ByteString stringify_cursor_shape(VT::CursorShape);
|
||||
|
||||
private:
|
||||
TerminalWidget(int ptm_fd, bool automatic_size_policy);
|
||||
|
@ -136,7 +136,7 @@ private:
|
|||
virtual void emit(u8 const*, size_t) override;
|
||||
|
||||
// ^GUI::Clipboard::ClipboardClient
|
||||
virtual void clipboard_content_did_change(DeprecatedString const&) override { update_paste_action(); }
|
||||
virtual void clipboard_content_did_change(ByteString const&) override { update_paste_action(); }
|
||||
|
||||
void send_non_user_input(ReadonlyBytes);
|
||||
|
||||
|
@ -167,21 +167,21 @@ private:
|
|||
|
||||
VT::Range m_selection;
|
||||
|
||||
DeprecatedString m_hovered_href;
|
||||
Optional<DeprecatedString> m_hovered_href_id;
|
||||
ByteString m_hovered_href;
|
||||
Optional<ByteString> m_hovered_href_id;
|
||||
|
||||
DeprecatedString m_active_href;
|
||||
Optional<DeprecatedString> m_active_href_id;
|
||||
ByteString m_active_href;
|
||||
Optional<ByteString> m_active_href_id;
|
||||
|
||||
// Snapshot of m_hovered_href when opening a context menu for a hyperlink.
|
||||
DeprecatedString m_context_menu_href;
|
||||
ByteString m_context_menu_href;
|
||||
|
||||
Gfx::Color m_colors[256];
|
||||
Gfx::Color m_default_foreground_color;
|
||||
Gfx::Color m_default_background_color;
|
||||
bool m_show_bold_text_as_bright { true };
|
||||
|
||||
DeprecatedString m_color_scheme_name;
|
||||
ByteString m_color_scheme_name;
|
||||
|
||||
BellMode m_bell_mode { BellMode::Visible };
|
||||
bool m_alt_key_held { false };
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue