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

ThemeEditor: Port to Core::Stream

This commit is contained in:
Lucas CHOLLET 2023-01-07 12:18:16 -05:00 committed by Sam Atkins
parent a5d5b970ff
commit 8377adfde0
3 changed files with 19 additions and 19 deletions

View file

@ -53,11 +53,11 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
// Note: This is deferred to ensure that the window has already popped and thus proper window stealing can be performed.
app->event_loop().deferred_invoke(
[&window, &path, &main_widget]() {
auto response = FileSystemAccessClient::Client::the().try_request_file_read_only_approved_deprecated(window, path.value());
auto response = FileSystemAccessClient::Client::the().request_file_read_only_approved(window, path.value());
if (response.is_error())
GUI::MessageBox::show_error(window, DeprecatedString::formatted("Opening \"{}\" failed: {}", path.value(), response.error()));
else {
auto load_from_file_result = main_widget->load_from_file(response.release_value());
auto load_from_file_result = main_widget->load_from_file(response.value().filename(), response.value().release_stream());
if (load_from_file_result.is_error())
GUI::MessageBox::show_error(window, DeprecatedString::formatted("Loading theme from file has failed: {}", load_from_file_result.error()));
}