mirror of
https://github.com/RGBCube/serenity
synced 2025-07-28 04:17:34 +00:00
AK+Everywhere: Rename String to DeprecatedString
We have a new, improved string type coming up in AK (OOM aware, no null state), and while it's going to use UTF-8, the name UTF8String is a mouthful - so let's free up the String name by renaming the existing class. Making the old one have an annoying name will hopefully also help with quick adoption :^)
This commit is contained in:
parent
f74251606d
commit
6e19ab2bbc
2006 changed files with 11635 additions and 11636 deletions
|
@ -17,7 +17,7 @@ class DemoWizardDialog : public GUI::WizardDialog {
|
|||
C_OBJECT(DemoWizardDialog);
|
||||
|
||||
public:
|
||||
String page_1_location() { return m_page_1_location_text_box->get_text(); }
|
||||
DeprecatedString page_1_location() { return m_page_1_location_text_box->get_text(); }
|
||||
|
||||
private:
|
||||
DemoWizardDialog(GUI::Window* parent_window);
|
||||
|
|
|
@ -27,7 +27,7 @@ public:
|
|||
|
||||
virtual int row_count(const GUI::ModelIndex&) const override { return m_cursors.size(); }
|
||||
virtual int column_count(const GUI::ModelIndex&) const override { return Column::__Count; }
|
||||
virtual String column_name(int column_index) const override
|
||||
virtual DeprecatedString column_name(int column_index) const override
|
||||
{
|
||||
switch (column_index) {
|
||||
case Column::Bitmap:
|
||||
|
@ -60,7 +60,7 @@ public:
|
|||
{
|
||||
m_cursors.clear();
|
||||
|
||||
Core::DirIterator iterator(String::formatted("/res/cursor-themes/{}", GUI::ConnectionToWindowServer::the().get_cursor_theme()), Core::DirIterator::Flags::SkipDots);
|
||||
Core::DirIterator iterator(DeprecatedString::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;
|
||||
String path;
|
||||
String name;
|
||||
DeprecatedString path;
|
||||
DeprecatedString name;
|
||||
Gfx::CursorParams params;
|
||||
};
|
||||
|
||||
|
@ -112,7 +112,7 @@ public:
|
|||
|
||||
virtual int row_count(const GUI::ModelIndex&) const override { return m_icon_sets.size(); }
|
||||
virtual int column_count(const GUI::ModelIndex&) const override { return Column::__Count; }
|
||||
virtual String column_name(int column_index) const override
|
||||
virtual DeprecatedString column_name(int column_index) const override
|
||||
{
|
||||
switch (column_index) {
|
||||
case Column::BigIcon:
|
||||
|
@ -194,7 +194,7 @@ private:
|
|||
struct IconSet {
|
||||
RefPtr<Gfx::Bitmap> big_icon;
|
||||
RefPtr<Gfx::Bitmap> little_icon;
|
||||
String name;
|
||||
DeprecatedString name;
|
||||
};
|
||||
|
||||
Vector<IconSet> m_icon_sets;
|
||||
|
|
|
@ -54,7 +54,7 @@ GalleryWidget::GalleryWidget()
|
|||
m_frame_shapes.append("Sunken Panel");
|
||||
|
||||
m_frame_shape_combobox = basics_tab->find_descendant_of_type_named<GUI::ComboBox>("frame_shape_combobox");
|
||||
m_frame_shape_combobox->set_model(*GUI::ItemListModel<String>::create(m_frame_shapes));
|
||||
m_frame_shape_combobox->set_model(*GUI::ItemListModel<DeprecatedString>::create(m_frame_shapes));
|
||||
|
||||
m_frame_shape_combobox->on_change = [&](auto&, auto const& index) {
|
||||
m_label_frame->set_frame_shape(static_cast<Gfx::FrameShape>((index.row() - 1) % 3 + 1));
|
||||
|
@ -118,7 +118,7 @@ GalleryWidget::GalleryWidget()
|
|||
m_input_button->set_icon(Gfx::Bitmap::try_load_from_file("/res/icons/16x16/properties.png"sv).release_value_but_fixme_should_propagate_errors());
|
||||
|
||||
m_input_button->on_click = [&](auto) {
|
||||
String value;
|
||||
DeprecatedString value;
|
||||
if (GUI::InputBox::show(window(), value, "Enter input:"sv, "Input"sv) == GUI::InputBox::ExecResult::OK && !value.is_empty())
|
||||
m_text_editor->set_text(value);
|
||||
};
|
||||
|
@ -150,7 +150,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<String>::create(m_msgbox_icons));
|
||||
m_msgbox_icon_combobox->set_model(*GUI::ItemListModel<DeprecatedString>::create(m_msgbox_icons));
|
||||
m_msgbox_icon_combobox->set_selected_index(0);
|
||||
|
||||
m_msgbox_icon_combobox->on_change = [&](auto&, auto const& index) {
|
||||
|
@ -158,7 +158,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<String>::create(m_msgbox_buttons));
|
||||
m_msgbox_buttons_combobox->set_model(*GUI::ItemListModel<DeprecatedString>::create(m_msgbox_buttons));
|
||||
m_msgbox_buttons_combobox->set_selected_index(0);
|
||||
|
||||
m_msgbox_buttons_combobox->on_change = [&](auto&, auto const& index) {
|
||||
|
@ -269,7 +269,7 @@ GalleryWidget::GalleryWidget()
|
|||
" _||_-\n"
|
||||
};
|
||||
|
||||
m_wizard_output->set_text(String::formatted("{}{}", serenityos_ascii, wizard_ascii));
|
||||
m_wizard_output->set_text(DeprecatedString::formatted("{}{}", serenityos_ascii, wizard_ascii));
|
||||
|
||||
m_wizard_button->on_click = [&](auto) {
|
||||
StringBuilder sb;
|
||||
|
@ -280,9 +280,9 @@ GalleryWidget::GalleryWidget()
|
|||
auto wizard = DemoWizardDialog::try_create(window()).release_value_but_fixme_should_propagate_errors();
|
||||
auto result = wizard->exec();
|
||||
|
||||
sb.append(String::formatted("\nWizard execution complete.\nDialog ExecResult code: {}", to_underlying(result)));
|
||||
sb.append(DeprecatedString::formatted("\nWizard execution complete.\nDialog ExecResult code: {}", to_underlying(result)));
|
||||
if (result == GUI::Dialog::ExecResult::OK)
|
||||
sb.append(String::formatted(" (ExecResult::OK)\n'Installation' location: \"{}\"", wizard->page_1_location()));
|
||||
sb.append(DeprecatedString::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<String> m_frame_shapes;
|
||||
Vector<String> m_msgbox_icons;
|
||||
Vector<String> m_msgbox_buttons;
|
||||
Vector<DeprecatedString> m_frame_shapes;
|
||||
Vector<DeprecatedString> m_msgbox_icons;
|
||||
Vector<DeprecatedString> 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