1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 10:57:35 +00:00

KeyboardMapper: Port to Core::Stream

Port KeyboardMapperWidget to use the new Core::Stream instead of the old
IODevice.

If you can't beat 'em, join 'em.
This commit is contained in:
RasmusNylander 2021-12-17 22:03:23 +01:00 committed by Andreas Kling
parent 9678ff15a8
commit c00014fa54
3 changed files with 12 additions and 9 deletions

View file

@ -1,5 +1,6 @@
/*
* Copyright (c) 2020, Hüseyin Aslıtürk <asliturk@hotmail.com>
* Copyright (c) 2021, Rasmus Nylander <RasmusNylander.SerenityOS@gmail.com>
*
* SPDX-License-Identifier: BSD-2-Clause
*/
@ -48,7 +49,8 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
auto open_action = GUI::CommonActions::make_open_action(
[&](auto&) {
Optional<String> path = GUI::FilePicker::get_open_filepath(window, "Open", "/res/keymaps/");
if (!path.has_value()) return;
if (!path.has_value())
return;
ErrorOr<void> error_or = keyboard_mapper_widget->load_map_from_file(path.value());
if (error_or.is_error())