mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 17:47:44 +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
|
@ -57,7 +57,7 @@ void KeyboardMapperWidget::create_frame()
|
|||
tmp_button.set_enabled(keys[i].enabled);
|
||||
|
||||
tmp_button.on_click = [this, &tmp_button]() {
|
||||
String value;
|
||||
DeprecatedString value;
|
||||
if (GUI::InputBox::show(window(), value, "New Character:"sv, "Select Character"sv) == GUI::InputBox::ExecResult::OK) {
|
||||
int i = m_keys.find_first_index(&tmp_button).value_or(0);
|
||||
VERIFY(i > 0);
|
||||
|
@ -127,7 +127,7 @@ u32* KeyboardMapperWidget::map_from_name(const StringView map_name)
|
|||
return map;
|
||||
}
|
||||
|
||||
ErrorOr<void> KeyboardMapperWidget::load_map_from_file(String const& filename)
|
||||
ErrorOr<void> KeyboardMapperWidget::load_map_from_file(DeprecatedString const& filename)
|
||||
{
|
||||
auto character_map = TRY(Keyboard::CharacterMapFile::load_from_file(filename));
|
||||
|
||||
|
@ -149,7 +149,7 @@ ErrorOr<void> KeyboardMapperWidget::load_map_from_system()
|
|||
{
|
||||
auto character_map = TRY(Keyboard::CharacterMap::fetch_system_map());
|
||||
|
||||
m_filename = String::formatted("/res/keymaps/{}.json", character_map.character_map_name());
|
||||
m_filename = DeprecatedString::formatted("/res/keymaps/{}.json", character_map.character_map_name());
|
||||
m_character_map = character_map.character_map_data();
|
||||
set_current_map("map");
|
||||
|
||||
|
@ -171,7 +171,7 @@ ErrorOr<void> KeyboardMapperWidget::save_to_file(StringView filename)
|
|||
{
|
||||
JsonObject map_json;
|
||||
|
||||
auto add_array = [&](String name, u32* values) {
|
||||
auto add_array = [&](DeprecatedString name, u32* values) {
|
||||
JsonArray items;
|
||||
for (int i = 0; i < 90; i++) {
|
||||
StringBuilder sb;
|
||||
|
@ -191,7 +191,7 @@ ErrorOr<void> KeyboardMapperWidget::save_to_file(StringView filename)
|
|||
add_array("shift_altgr_map", m_character_map.shift_altgr_map);
|
||||
|
||||
// Write to file.
|
||||
String file_content = map_json.to_string();
|
||||
DeprecatedString file_content = map_json.to_string();
|
||||
auto file = TRY(Core::Stream::File::open(filename, Core::Stream::OpenMode::Write));
|
||||
TRY(file->write(file_content.bytes()));
|
||||
file->close();
|
||||
|
@ -236,7 +236,7 @@ void KeyboardMapperWidget::keyup_event(GUI::KeyEvent& event)
|
|||
}
|
||||
}
|
||||
|
||||
void KeyboardMapperWidget::set_current_map(const String current_map)
|
||||
void KeyboardMapperWidget::set_current_map(const DeprecatedString current_map)
|
||||
{
|
||||
m_current_map_name = current_map;
|
||||
u32* map = map_from_name(m_current_map_name);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue