1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 00:27:45 +00:00

Chess: Replace usage of DeprecatedString

This commit is contained in:
aryanbaburajan 2023-07-07 13:23:21 +05:30 committed by Jelle Raaijmakers
parent a94c0eea94
commit eb85291a18
5 changed files with 38 additions and 29 deletions

View file

@ -69,6 +69,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
for (auto const& engine : engines)
TRY(Core::System::unveil(engine.path, "x"sv));
TRY(Core::System::unveil("/etc/passwd", "r"));
TRY(Core::System::unveil("/res", "r"));
TRY(Core::System::unveil("/bin/GamesSettings", "x"));
TRY(Core::System::unveil("/tmp/session/%sid/portal/launch", "rw"));
@ -125,7 +126,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
dbgln("Exported PGN file to {}", result.value().filename());
})));
TRY(game_menu->try_add_action(GUI::Action::create("&Copy FEN", { Mod_Ctrl, Key_C }, [&](auto&) {
GUI::Clipboard::the().set_data(widget->get_fen().bytes());
GUI::Clipboard::the().set_data(widget->get_fen().release_value_but_fixme_should_propagate_errors().bytes());
GUI::MessageBox::show(window, "Board state copied to clipboard as FEN."sv, "Copy FEN"sv, GUI::MessageBox::Type::Information);
})));
TRY(game_menu->try_add_separator());