mirror of
https://github.com/RGBCube/serenity
synced 2025-07-28 02:47:34 +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
|
@ -17,7 +17,7 @@ class DemoWizardDialog : public GUI::WizardDialog {
|
|||
C_OBJECT(DemoWizardDialog);
|
||||
|
||||
public:
|
||||
DeprecatedString page_1_location() { return m_page_1_location_text_box->get_text(); }
|
||||
ByteString page_1_location() { return m_page_1_location_text_box->get_text(); }
|
||||
|
||||
private:
|
||||
DemoWizardDialog(GUI::Window* parent_window);
|
||||
|
|
|
@ -60,7 +60,7 @@ public:
|
|||
{
|
||||
m_cursors.clear();
|
||||
|
||||
Core::DirIterator iterator(DeprecatedString::formatted("/res/cursor-themes/{}", GUI::ConnectionToWindowServer::the().get_cursor_theme()), Core::DirIterator::Flags::SkipDots);
|
||||
Core::DirIterator iterator(ByteString::formatted("/res/cursor-themes/{}", GUI::ConnectionToWindowServer::the().get_cursor_theme()), Core::DirIterator::Flags::SkipDots);
|
||||
|
||||
while (iterator.has_next()) {
|
||||
auto path = iterator.next_full_path();
|
||||
|
@ -90,8 +90,8 @@ private:
|
|||
|
||||
struct Cursor {
|
||||
RefPtr<Gfx::Bitmap> bitmap;
|
||||
DeprecatedString path;
|
||||
DeprecatedString name;
|
||||
ByteString path;
|
||||
ByteString name;
|
||||
Gfx::CursorParams params;
|
||||
};
|
||||
|
||||
|
@ -194,7 +194,7 @@ private:
|
|||
struct IconSet {
|
||||
RefPtr<Gfx::Bitmap> big_icon;
|
||||
RefPtr<Gfx::Bitmap> little_icon;
|
||||
DeprecatedString name;
|
||||
ByteString name;
|
||||
};
|
||||
|
||||
Vector<IconSet> m_icon_sets;
|
||||
|
|
|
@ -53,7 +53,7 @@ GalleryWidget::GalleryWidget()
|
|||
m_frame_shapes.append("Sunken Panel");
|
||||
|
||||
m_frame_shape_combobox = basics_tab.find_descendant_of_type_named<GUI::ComboBox>("frame_style_combobox");
|
||||
m_frame_shape_combobox->set_model(*GUI::ItemListModel<DeprecatedString>::create(m_frame_shapes));
|
||||
m_frame_shape_combobox->set_model(*GUI::ItemListModel<ByteString>::create(m_frame_shapes));
|
||||
|
||||
m_frame_shape_combobox->on_change = [&](auto&, auto const& index) {
|
||||
m_label_frame->set_frame_style(static_cast<Gfx::FrameStyle>(index.row()));
|
||||
|
@ -61,7 +61,7 @@ GalleryWidget::GalleryWidget()
|
|||
};
|
||||
|
||||
m_frame_shape_combobox->on_return_pressed = [&]() {
|
||||
m_enabled_label->set_text(String::from_deprecated_string(m_frame_shape_combobox->text()).release_value_but_fixme_should_propagate_errors());
|
||||
m_enabled_label->set_text(String::from_byte_string(m_frame_shape_combobox->text()).release_value_but_fixme_should_propagate_errors());
|
||||
};
|
||||
|
||||
m_button_icons.append(Gfx::Bitmap::load_from_file("/res/icons/16x16/book-open.png"sv).release_value_but_fixme_should_propagate_errors());
|
||||
|
@ -141,7 +141,7 @@ GalleryWidget::GalleryWidget()
|
|||
m_msgbox_buttons.append("Yes No Cancel");
|
||||
|
||||
m_msgbox_icon_combobox = basics_tab.find_descendant_of_type_named<GUI::ComboBox>("msgbox_icon_combobox");
|
||||
m_msgbox_icon_combobox->set_model(*GUI::ItemListModel<DeprecatedString>::create(m_msgbox_icons));
|
||||
m_msgbox_icon_combobox->set_model(*GUI::ItemListModel<ByteString>::create(m_msgbox_icons));
|
||||
m_msgbox_icon_combobox->set_selected_index(0);
|
||||
|
||||
m_msgbox_icon_combobox->on_change = [&](auto&, auto const& index) {
|
||||
|
@ -149,7 +149,7 @@ GalleryWidget::GalleryWidget()
|
|||
};
|
||||
|
||||
m_msgbox_buttons_combobox = basics_tab.find_descendant_of_type_named<GUI::ComboBox>("msgbox_buttons_combobox");
|
||||
m_msgbox_buttons_combobox->set_model(*GUI::ItemListModel<DeprecatedString>::create(m_msgbox_buttons));
|
||||
m_msgbox_buttons_combobox->set_model(*GUI::ItemListModel<ByteString>::create(m_msgbox_buttons));
|
||||
m_msgbox_buttons_combobox->set_selected_index(0);
|
||||
|
||||
m_msgbox_buttons_combobox->on_change = [&](auto&, auto const& index) {
|
||||
|
@ -260,20 +260,20 @@ GalleryWidget::GalleryWidget()
|
|||
" _||_-\n"
|
||||
};
|
||||
|
||||
m_wizard_output->set_text(DeprecatedString::formatted("{}{}", serenityos_ascii, wizard_ascii));
|
||||
m_wizard_output->set_text(ByteString::formatted("{}{}", serenityos_ascii, wizard_ascii));
|
||||
|
||||
m_wizard_button->on_click = [&](auto) {
|
||||
StringBuilder sb;
|
||||
sb.append(m_wizard_output->get_text());
|
||||
sb.append("\nWizard started."sv);
|
||||
m_wizard_output->set_text(sb.to_deprecated_string());
|
||||
m_wizard_output->set_text(sb.to_byte_string());
|
||||
|
||||
auto wizard = DemoWizardDialog::try_create(window()).release_value_but_fixme_should_propagate_errors();
|
||||
auto result = wizard->exec();
|
||||
|
||||
sb.append(DeprecatedString::formatted("\nWizard execution complete.\nDialog ExecResult code: {}", to_underlying(result)));
|
||||
sb.append(ByteString::formatted("\nWizard execution complete.\nDialog ExecResult code: {}", to_underlying(result)));
|
||||
if (result == GUI::Dialog::ExecResult::OK)
|
||||
sb.append(DeprecatedString::formatted(" (ExecResult::OK)\n'Installation' location: \"{}\"", wizard->page_1_location()));
|
||||
sb.append(ByteString::formatted(" (ExecResult::OK)\n'Installation' location: \"{}\"", wizard->page_1_location()));
|
||||
m_wizard_output->set_text(sb.string_view());
|
||||
};
|
||||
|
||||
|
|
|
@ -61,9 +61,9 @@ private:
|
|||
RefPtr<GUI::ValueSlider> m_opacity_value_slider;
|
||||
RefPtr<GUI::ImageWidget> m_opacity_imagewidget;
|
||||
|
||||
Vector<DeprecatedString> m_frame_shapes;
|
||||
Vector<DeprecatedString> m_msgbox_icons;
|
||||
Vector<DeprecatedString> m_msgbox_buttons;
|
||||
Vector<ByteString> m_frame_shapes;
|
||||
Vector<ByteString> m_msgbox_icons;
|
||||
Vector<ByteString> m_msgbox_buttons;
|
||||
Vector<RefPtr<Gfx::Bitmap>> m_button_icons;
|
||||
|
||||
GUI::MessageBox::Type m_msgbox_type;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue