diff options
author | Linus Groh <mail@linusgroh.de> | 2022-12-04 18:02:33 +0000 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2022-12-06 08:54:33 +0100 |
commit | 6e19ab2bbce0b113b628e6f8e9b5c0640053933e (patch) | |
tree | 372d21b2f5dcff112f5d0089559c6af5798680d4 /Userland/Applications/KeyboardMapper/KeyboardMapperWidget.cpp | |
parent | f74251606d74b504a1379ebb893fdb5529054ea5 (diff) | |
download | serenity-6e19ab2bbce0b113b628e6f8e9b5c0640053933e.zip |
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 :^)
Diffstat (limited to 'Userland/Applications/KeyboardMapper/KeyboardMapperWidget.cpp')
-rw-r--r-- | Userland/Applications/KeyboardMapper/KeyboardMapperWidget.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/Userland/Applications/KeyboardMapper/KeyboardMapperWidget.cpp b/Userland/Applications/KeyboardMapper/KeyboardMapperWidget.cpp index dccc76b064..c8c32eb5eb 100644 --- a/Userland/Applications/KeyboardMapper/KeyboardMapperWidget.cpp +++ b/Userland/Applications/KeyboardMapper/KeyboardMapperWidget.cpp @@ -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); |