1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 11:17: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

@ -183,7 +183,7 @@ public:
{
}
DeprecatedString const& title() const { return m_title; }
ByteString const& title() const { return m_title; }
Gfx::IntRect const& rect() const { return m_rect; }
bool is_active() const { return m_active; }
bool is_blocked() const { return m_blocked; }
@ -195,7 +195,7 @@ public:
unsigned workspace_column() const { return m_workspace_column; }
private:
DeprecatedString m_title;
ByteString m_title;
Gfx::IntRect m_rect;
WindowType m_window_type;
unsigned m_workspace_row;
@ -254,16 +254,16 @@ private:
class WMKeymapChangedEvent : public WMEvent {
public:
explicit WMKeymapChangedEvent(int client_id, DeprecatedString const& keymap)
explicit WMKeymapChangedEvent(int client_id, ByteString const& keymap)
: WMEvent(Event::Type::WM_KeymapChanged, client_id, 0)
, m_keymap(keymap)
{
}
DeprecatedString const& keymap() const { return m_keymap; }
ByteString const& keymap() const { return m_keymap; }
private:
const DeprecatedString m_keymap;
const ByteString m_keymap;
};
class WMAddToQuickLaunchEvent : public WMEvent {
@ -403,15 +403,15 @@ public:
bool super() const { return m_modifiers & Mod_Super; }
u8 modifiers() const { return m_modifiers; }
u32 code_point() const { return m_code_point; }
DeprecatedString text() const
ByteString text() const
{
StringBuilder sb;
sb.append_code_point(m_code_point);
return sb.to_deprecated_string();
return sb.to_byte_string();
}
u32 scancode() const { return m_scancode; }
DeprecatedString to_deprecated_string() const;
ByteString to_byte_string() const;
bool is_arrow_key() const
{
@ -494,17 +494,17 @@ private:
class DropEvent final : public Event {
public:
DropEvent(Gfx::IntPoint, DeprecatedString const& text, NonnullRefPtr<Core::MimeData const> mime_data);
DropEvent(Gfx::IntPoint, ByteString const& text, NonnullRefPtr<Core::MimeData const> mime_data);
~DropEvent() = default;
Gfx::IntPoint position() const { return m_position; }
DeprecatedString const& text() const { return m_text; }
ByteString const& text() const { return m_text; }
Core::MimeData const& mime_data() const { return m_mime_data; }
private:
Gfx::IntPoint m_position;
DeprecatedString m_text;
ByteString m_text;
NonnullRefPtr<Core::MimeData const> m_mime_data;
};