diff options
author | Hüseyin ASLITÜRK <asliturk@hotmail.com> | 2020-06-13 13:52:56 +0300 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2020-06-16 13:15:17 +0200 |
commit | 1887e35dc840e6742b853252705be7d687aadeaa (patch) | |
tree | 36067ed82233a1715f10197ffe811c18bae5eb58 /Applications | |
parent | 2f7e5a5e40f2a584a76a3948dc321827a133e80e (diff) | |
download | serenity-1887e35dc840e6742b853252705be7d687aadeaa.zip |
KeyboardMapper: Replace char data type to u32 for code point
Diffstat (limited to 'Applications')
-rw-r--r-- | Applications/KeyboardMapper/KeyButton.cpp | 1 | ||||
-rw-r--r-- | Applications/KeyboardMapper/KeyboardMapperWidget.cpp | 8 |
2 files changed, 4 insertions, 5 deletions
diff --git a/Applications/KeyboardMapper/KeyButton.cpp b/Applications/KeyboardMapper/KeyButton.cpp index ea342204a1..de090602aa 100644 --- a/Applications/KeyboardMapper/KeyButton.cpp +++ b/Applications/KeyboardMapper/KeyButton.cpp @@ -94,4 +94,3 @@ void KeyButton::leave_event(Core::Event& event) window()->set_override_cursor(GUI::StandardCursor::Arrow); AbstractButton::leave_event(event); } - diff --git a/Applications/KeyboardMapper/KeyboardMapperWidget.cpp b/Applications/KeyboardMapper/KeyboardMapperWidget.cpp index d775c53a4e..9c56464c83 100644 --- a/Applications/KeyboardMapper/KeyboardMapperWidget.cpp +++ b/Applications/KeyboardMapper/KeyboardMapperWidget.cpp @@ -77,7 +77,7 @@ void KeyboardMapperWidget::create_frame() ASSERT(index > 0); tmp_button.set_text(value); - char* map; + u32* map; if (m_current_map_name == "map") { map = m_character_map.map; @@ -176,7 +176,7 @@ void KeyboardMapperWidget::save_to_file(const StringView& file_name) { JsonObject map_json; - auto add_array = [&](String name, char* values) { + auto add_array = [&](String name, u32* values) { JsonArray items; for (int i = 0; i < 90; i++) { AK::StringBuilder sb; @@ -249,7 +249,7 @@ void KeyboardMapperWidget::keyup_event(GUI::KeyEvent& event) void KeyboardMapperWidget::set_current_map(const String current_map) { m_current_map_name = current_map; - char* map; + u32* map; if (m_current_map_name == "map") { map = m_character_map.map; @@ -269,7 +269,7 @@ void KeyboardMapperWidget::set_current_map(const String current_map) continue; AK::StringBuilder sb; - sb.append(map[index]); + sb.append_codepoint(map[index]); m_keys.at(k)->set_text(sb.to_string()); } |