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

@ -20,13 +20,13 @@ class PropertiesWindow final : public GUI::Window {
C_OBJECT(PropertiesWindow);
public:
static ErrorOr<NonnullRefPtr<PropertiesWindow>> try_create(DeprecatedString const& path, bool disable_rename, Window* parent = nullptr);
static ErrorOr<NonnullRefPtr<PropertiesWindow>> try_create(ByteString const& path, bool disable_rename, Window* parent = nullptr);
virtual ~PropertiesWindow() override = default;
virtual void close() final;
private:
PropertiesWindow(DeprecatedString const& path, Window* parent = nullptr);
PropertiesWindow(ByteString const& path, Window* parent = nullptr);
ErrorOr<void> create_widgets(bool disable_rename);
ErrorOr<void> create_general_tab(GUI::TabWidget&, bool disable_rename);
ErrorOr<void> create_file_type_specific_tabs(GUI::TabWidget&);
@ -44,7 +44,7 @@ private:
class DirectoryStatisticsCalculator final : public RefCounted<DirectoryStatisticsCalculator> {
public:
DirectoryStatisticsCalculator(DeprecatedString path);
DirectoryStatisticsCalculator(ByteString path);
void start();
void stop();
Function<void(off_t total_size_in_bytes, size_t file_count, size_t directory_count)> on_update;
@ -54,7 +54,7 @@ private:
size_t m_file_count { 0 };
size_t m_directory_count { 0 };
RefPtr<Threading::BackgroundAction<int>> m_background_action;
Queue<DeprecatedString> m_work_queue;
Queue<ByteString> m_work_queue;
};
static StringView const get_description(mode_t const mode)
@ -84,7 +84,7 @@ private:
void permission_changed(mode_t mask, bool set);
bool apply_changes();
void update();
DeprecatedString make_full_path(DeprecatedString const& name);
ByteString make_full_path(ByteString const& name);
RefPtr<GUI::Button> m_apply_button;
RefPtr<GUI::TextBox> m_name_box;
@ -92,9 +92,9 @@ private:
RefPtr<GUI::Label> m_size_label;
RefPtr<DirectoryStatisticsCalculator> m_directory_statistics_calculator;
RefPtr<GUI::Action> m_on_escape;
DeprecatedString m_name;
DeprecatedString m_parent_path;
DeprecatedString m_path;
ByteString m_name;
ByteString m_parent_path;
ByteString m_path;
mode_t m_mode { 0 };
mode_t m_old_mode { 0 };
bool m_permissions_dirty { false };