1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-28 03:37:35 +00:00

Everywhere: Use _{short_,}string to create Strings from literals

This commit is contained in:
Linus Groh 2023-02-25 16:40:37 +01:00
parent 85414d9338
commit 09d40bfbb2
92 changed files with 334 additions and 310 deletions

View file

@ -56,7 +56,7 @@ CellTypeDialog::CellTypeDialog(Vector<Position> const& positions, Sheet& sheet,
buttonbox.set_shrink_to_fit(true);
buttonbox.set_layout<GUI::HorizontalBoxLayout>(GUI::Margins {}, 10);
buttonbox.add_spacer().release_value_but_fixme_should_propagate_errors();
auto& ok_button = buttonbox.add<GUI::Button>(String::from_utf8_short_string("OK"sv));
auto& ok_button = buttonbox.add<GUI::Button>("OK"_short_string);
ok_button.set_fixed_width(80);
ok_button.on_click = [&](auto) { done(ExecResult::OK); };
}
@ -157,7 +157,7 @@ void CellTypeDialog::setup_tabs(GUI::TabWidget& tabs, Vector<Position> const& po
};
{
auto& checkbox = right_side.add<GUI::CheckBox>(String::from_utf8("Override max length"sv).release_value_but_fixme_should_propagate_errors());
auto& checkbox = right_side.add<GUI::CheckBox>("Override max length"_string.release_value_but_fixme_should_propagate_errors());
auto& spinbox = right_side.add<GUI::SpinBox>();
checkbox.set_checked(m_length != -1);
spinbox.set_min(0);
@ -177,7 +177,7 @@ void CellTypeDialog::setup_tabs(GUI::TabWidget& tabs, Vector<Position> const& po
};
}
{
auto& checkbox = right_side.add<GUI::CheckBox>(String::from_utf8("Override display format"sv).release_value_but_fixme_should_propagate_errors());
auto& checkbox = right_side.add<GUI::CheckBox>("Override display format"_string.release_value_but_fixme_should_propagate_errors());
auto& editor = right_side.add<GUI::TextEditor>();
checkbox.set_checked(!m_format.is_empty());
editor.set_name("format_editor");